Skip to content

Commit 60ef193

Browse files
committed
s390x: use "lghi" for immediate values to fix build with clang
Some of the kernels written in assembly utilize a "load address" instruction for loading an immediate value into a register. That is both unnecessarily complex and LLVM's assembler does not understand that specific syntax. Thus, replace with the appropriate "load immediate" instruction, which is also clearer to read. Signed-off-by: Marius Hillenbrand <[email protected]>
1 parent 18bfb6d commit 60ef193

File tree

4 files changed

+42
-42
lines changed

4 files changed

+42
-42
lines changed

kernel/zarch/ctrmm4x4V.S

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ ALIGN_4
198198
RefreshTempBk LOCAL_VAR1,BK,OFF,4,4
199199
nill LOCAL_VAR1,3
200200
#else
201-
la LOCAL_VAR1,3(0,0)
201+
lghi LOCAL_VAR1,3
202202
NGR LOCAL_VAR1,BK /*refresh BK*/
203203
#endif
204204
jz .L4x4_BK_Store
@@ -254,7 +254,7 @@ ALIGN_4
254254
RefreshTempBk LOCAL_VAR1,BK,OFF,2,4
255255
nill LOCAL_VAR1,3
256256
#else
257-
la LOCAL_VAR1,3(0,0)
257+
lghi LOCAL_VAR1,3
258258
NGR LOCAL_VAR1,BK /*refresh BK*/
259259
#endif
260260
jz .L2x4_BK_Store
@@ -305,7 +305,7 @@ ALIGN_4
305305
RefreshTempBk LOCAL_VAR1,BK,OFF,1,4
306306
nill LOCAL_VAR1,3
307307
#else
308-
la LOCAL_VAR1,3(0,0)
308+
lghi LOCAL_VAR1,3
309309
NGR LOCAL_VAR1,BK /*refresh BK*/
310310
#endif
311311
jz .L1x4_BK_Store
@@ -385,7 +385,7 @@ ALIGN_4
385385
RefreshTempBk LOCAL_VAR1,BK,OFF,4,2
386386
nill LOCAL_VAR1,3
387387
#else
388-
la LOCAL_VAR1,3(0,0)
388+
lghi LOCAL_VAR1,3
389389
NGR LOCAL_VAR1,BK /*refresh BK*/
390390
#endif
391391
jz .L4x2_BK_Store
@@ -442,7 +442,7 @@ ALIGN_4
442442
RefreshTempBk LOCAL_VAR1,BK,OFF,2,2
443443
nill LOCAL_VAR1,3
444444
#else
445-
la LOCAL_VAR1,3(0,0)
445+
lghi LOCAL_VAR1,3
446446
NGR LOCAL_VAR1,BK /*refresh BK*/
447447
#endif
448448
jz .L2x2_BK_Store
@@ -492,7 +492,7 @@ ALIGN_4
492492
RefreshTempBk LOCAL_VAR1,BK,OFF,1,2
493493
nill LOCAL_VAR1,3
494494
#else
495-
la LOCAL_VAR1,3(0,0)
495+
lghi LOCAL_VAR1,3
496496
NGR LOCAL_VAR1,BK /*refresh BK*/
497497
#endif
498498
jz .L1x2_BK_Store
@@ -568,7 +568,7 @@ ALIGN_4
568568
RefreshTempBk LOCAL_VAR1,BK,OFF,4,1
569569
nill LOCAL_VAR1,3
570570
#else
571-
la LOCAL_VAR1,3(0,0)
571+
lghi LOCAL_VAR1,3
572572
NGR LOCAL_VAR1,BK /*refresh BK*/
573573
#endif
574574
jz .L4x1_BK_Store
@@ -620,7 +620,7 @@ ALIGN_4
620620
RefreshTempBk LOCAL_VAR1,BK,OFF,2,1
621621
nill LOCAL_VAR1,3
622622
#else
623-
la LOCAL_VAR1,3(0,0)
623+
lghi LOCAL_VAR1,3
624624
NGR LOCAL_VAR1,BK /*refresh BK*/
625625
#endif
626626
jz .L2x1_BK_Store
@@ -670,7 +670,7 @@ ALIGN_4
670670
RefreshTempBk LOCAL_VAR1,BK,OFF,1,1
671671
nill LOCAL_VAR1,3
672672
#else
673-
la LOCAL_VAR1,3(0,0)
673+
lghi LOCAL_VAR1,3
674674
NGR LOCAL_VAR1,BK /*refresh BK*/
675675
#endif
676676
jz .L1x1_BK_Store

kernel/zarch/gemm8x4V.S

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ brctg LOCAL_VAR1,.L8x4_4_BK
147147

148148
ALIGN_4
149149
.L8x4_mod:
150-
la LOCAL_VAR1,3(0,0)
150+
lghi LOCAL_VAR1,3
151151
NGR LOCAL_VAR1,BK /*refresh BK*/
152152
jz .L8x4_BK_Store
153153

@@ -183,7 +183,7 @@ brctg LOCAL_VAR1,.L4x4_4_BK
183183

184184
ALIGN_4
185185
.L4x4_mod:
186-
la LOCAL_VAR1,3(0,0)
186+
lghi LOCAL_VAR1,3
187187
NGR LOCAL_VAR1,BK /*refresh BK*/
188188
jz .L4x4_BK_Store
189189

@@ -217,7 +217,7 @@ brctg LOCAL_VAR1,.L2x4_4_BK
217217

218218
ALIGN_4
219219
.L2x4_mod:
220-
la LOCAL_VAR1,3(0,0)
220+
lghi LOCAL_VAR1,3
221221
NGR LOCAL_VAR1,BK /*refresh BK*/
222222
jz .L2x4_BK_Store
223223

@@ -252,7 +252,7 @@ brctg LOCAL_VAR1,.L1x4_4_BK
252252

253253
ALIGN_4
254254
.L1x4_mod:
255-
la LOCAL_VAR1,3(0,0)
255+
lghi LOCAL_VAR1,3
256256
NGR LOCAL_VAR1,BK /*refresh BK*/
257257
jz .L1x4_BK_Store
258258

@@ -309,7 +309,7 @@ brctg LOCAL_VAR1,.L8x2_4_BK
309309

310310
ALIGN_4
311311
.L8x2_mod:
312-
la LOCAL_VAR1,3(0,0)
312+
lghi LOCAL_VAR1,3
313313
NGR LOCAL_VAR1,BK /*refresh BK*/
314314
jz .L8x2_BK_Store
315315

@@ -346,7 +346,7 @@ brctg LOCAL_VAR1,.L4x2_4_BK
346346

347347
ALIGN_4
348348
.L4x2_mod:
349-
la LOCAL_VAR1,3(0,0)
349+
lghi LOCAL_VAR1,3
350350
NGR LOCAL_VAR1,BK /*refresh BK*/
351351
jz .L4x2_BK_Store
352352

@@ -380,7 +380,7 @@ brctg LOCAL_VAR1,.L2x2_4_BK
380380

381381
ALIGN_4
382382
.L2x2_mod:
383-
la LOCAL_VAR1,3(0,0)
383+
lghi LOCAL_VAR1,3
384384
NGR LOCAL_VAR1,BK /*refresh BK*/
385385
jz .L2x2_BK_Store
386386

@@ -415,7 +415,7 @@ brctg LOCAL_VAR1,.L1x2_4_BK
415415

416416
ALIGN_4
417417
.L1x2_mod:
418-
la LOCAL_VAR1,3(0,0)
418+
lghi LOCAL_VAR1,3
419419
NGR LOCAL_VAR1,BK /*refresh BK*/
420420
jz .L1x2_BK_Store
421421

@@ -471,7 +471,7 @@ brctg LOCAL_VAR1,.L8x1_4_BK
471471

472472
ALIGN_4
473473
.L8x1_mod:
474-
la LOCAL_VAR1,3(0,0)
474+
lghi LOCAL_VAR1,3
475475
NGR LOCAL_VAR1,BK /*refresh BK*/
476476
jz .L8x1_BK_Store
477477

@@ -508,7 +508,7 @@ brctg LOCAL_VAR1,.L4x1_4_BK
508508

509509
ALIGN_4
510510
.L4x1_mod:
511-
la LOCAL_VAR1,3(0,0)
511+
lghi LOCAL_VAR1,3
512512
NGR LOCAL_VAR1,BK /*refresh BK*/
513513
jz .L4x1_BK_Store
514514

@@ -542,7 +542,7 @@ brctg LOCAL_VAR1,.L2x1_4_BK
542542

543543
ALIGN_4
544544
.L2x1_mod:
545-
la LOCAL_VAR1,3(0,0)
545+
lghi LOCAL_VAR1,3
546546
NGR LOCAL_VAR1,BK /*refresh BK*/
547547
jz .L2x1_BK_Store
548548

@@ -577,7 +577,7 @@ brctg LOCAL_VAR1,.L1x1_4_BK
577577

578578
ALIGN_4
579579
.L1x1_mod:
580-
la LOCAL_VAR1,3(0,0)
580+
lghi LOCAL_VAR1,3
581581
NGR LOCAL_VAR1,BK /*refresh BK*/
582582
jz .L1x1_BK_Store
583583

kernel/zarch/strmm8x4V.S

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ ALIGN_4
186186
RefreshTempBk LOCAL_VAR1,BK,OFF,8,4
187187
nill LOCAL_VAR1,3
188188
#else
189-
la LOCAL_VAR1,3(0,0)
189+
lghi LOCAL_VAR1,3
190190
NGR LOCAL_VAR1,BK /*refresh BK*/
191191
#endif
192192
jz .L8x4_BK_Store
@@ -239,7 +239,7 @@ ALIGN_4
239239
RefreshTempBk LOCAL_VAR1,BK,OFF,4,4
240240
nill LOCAL_VAR1,3
241241
#else
242-
la LOCAL_VAR1,3(0,0)
242+
lghi LOCAL_VAR1,3
243243
NGR LOCAL_VAR1,BK /*refresh BK*/
244244
#endif
245245
jz .L4x4_BK_Store
@@ -290,7 +290,7 @@ ALIGN_4
290290
RefreshTempBk LOCAL_VAR1,BK,OFF,2,4
291291
nill LOCAL_VAR1,3
292292
#else
293-
la LOCAL_VAR1,3(0,0)
293+
lghi LOCAL_VAR1,3
294294
NGR LOCAL_VAR1,BK /*refresh BK*/
295295
#endif
296296
jz .L2x4_BK_Store
@@ -341,7 +341,7 @@ ALIGN_4
341341
RefreshTempBk LOCAL_VAR1,BK,OFF,1,4
342342
nill LOCAL_VAR1,3
343343
#else
344-
la LOCAL_VAR1,3(0,0)
344+
lghi LOCAL_VAR1,3
345345
NGR LOCAL_VAR1,BK /*refresh BK*/
346346
#endif
347347
jz .L1x4_BK_Store
@@ -423,7 +423,7 @@ ALIGN_4
423423
RefreshTempBk LOCAL_VAR1,BK,OFF,8,2
424424
nill LOCAL_VAR1,3
425425
#else
426-
la LOCAL_VAR1,3(0,0)
426+
lghi LOCAL_VAR1,3
427427
NGR LOCAL_VAR1,BK /*refresh BK*/
428428
#endif
429429
jz .L8x2_BK_Store
@@ -475,7 +475,7 @@ ALIGN_4
475475
RefreshTempBk LOCAL_VAR1,BK,OFF,4,2
476476
nill LOCAL_VAR1,3
477477
#else
478-
la LOCAL_VAR1,3(0,0)
478+
lghi LOCAL_VAR1,3
479479
NGR LOCAL_VAR1,BK /*refresh BK*/
480480
#endif
481481
jz .L4x2_BK_Store
@@ -525,7 +525,7 @@ ALIGN_4
525525
RefreshTempBk LOCAL_VAR1,BK,OFF,2,2
526526
nill LOCAL_VAR1,3
527527
#else
528-
la LOCAL_VAR1,3(0,0)
528+
lghi LOCAL_VAR1,3
529529
NGR LOCAL_VAR1,BK /*refresh BK*/
530530
#endif
531531
jz .L2x2_BK_Store
@@ -575,7 +575,7 @@ ALIGN_4
575575
RefreshTempBk LOCAL_VAR1,BK,OFF,1,2
576576
nill LOCAL_VAR1,3
577577
#else
578-
la LOCAL_VAR1,3(0,0)
578+
lghi LOCAL_VAR1,3
579579
NGR LOCAL_VAR1,BK /*refresh BK*/
580580
#endif
581581
jz .L1x2_BK_Store
@@ -655,7 +655,7 @@ ALIGN_4
655655
RefreshTempBk LOCAL_VAR1,BK,OFF,8,1
656656
nill LOCAL_VAR1,3
657657
#else
658-
la LOCAL_VAR1,3(0,0)
658+
lghi LOCAL_VAR1,3
659659
NGR LOCAL_VAR1,BK /*refresh BK*/
660660
#endif
661661
jz .L8x1_BK_Store
@@ -708,7 +708,7 @@ ALIGN_4
708708
RefreshTempBk LOCAL_VAR1,BK,OFF,4,1
709709
nill LOCAL_VAR1,3
710710
#else
711-
la LOCAL_VAR1,3(0,0)
711+
lghi LOCAL_VAR1,3
712712
NGR LOCAL_VAR1,BK /*refresh BK*/
713713
#endif
714714
jz .L4x1_BK_Store
@@ -757,7 +757,7 @@ ALIGN_4
757757
RefreshTempBk LOCAL_VAR1,BK,OFF,2,1
758758
nill LOCAL_VAR1,3
759759
#else
760-
la LOCAL_VAR1,3(0,0)
760+
lghi LOCAL_VAR1,3
761761
NGR LOCAL_VAR1,BK /*refresh BK*/
762762
#endif
763763
jz .L2x1_BK_Store
@@ -807,7 +807,7 @@ ALIGN_4
807807
RefreshTempBk LOCAL_VAR1,BK,OFF,1,1
808808
nill LOCAL_VAR1,3
809809
#else
810-
la LOCAL_VAR1,3(0,0)
810+
lghi LOCAL_VAR1,3
811811
NGR LOCAL_VAR1,BK /*refresh BK*/
812812
#endif
813813
jz .L1x1_BK_Store

kernel/zarch/ztrmm4x4V.S

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ ALIGN_4
196196
RefreshTempBk LOCAL_VAR1,BK,OFF,4,4
197197
nill LOCAL_VAR1,3
198198
#else
199-
la LOCAL_VAR1,3(0,0)
199+
lghi LOCAL_VAR1,3
200200
NGR LOCAL_VAR1,BK /*refresh BK*/
201201
#endif
202202
jz .L4x4_BK_Store
@@ -256,7 +256,7 @@ ALIGN_4
256256
RefreshTempBk LOCAL_VAR1,BK,OFF,2,4
257257
nill LOCAL_VAR1,3
258258
#else
259-
la LOCAL_VAR1,3(0,0)
259+
lghi LOCAL_VAR1,3
260260
NGR LOCAL_VAR1,BK /*refresh BK*/
261261
#endif
262262
jz .L2x4_BK_Store
@@ -307,7 +307,7 @@ ALIGN_4
307307
RefreshTempBk LOCAL_VAR1,BK,OFF,1,4
308308
nill LOCAL_VAR1,3
309309
#else
310-
la LOCAL_VAR1,3(0,0)
310+
lghi LOCAL_VAR1,3
311311
NGR LOCAL_VAR1,BK /*refresh BK*/
312312
#endif
313313
jz .L1x4_BK_Store
@@ -390,7 +390,7 @@ ALIGN_4
390390
RefreshTempBk LOCAL_VAR1,BK,OFF,4,2
391391
nill LOCAL_VAR1,3
392392
#else
393-
la LOCAL_VAR1,3(0,0)
393+
lghi LOCAL_VAR1,3
394394
NGR LOCAL_VAR1,BK /*refresh BK*/
395395
#endif
396396
jz .L4x2_BK_Store
@@ -447,7 +447,7 @@ ALIGN_4
447447
RefreshTempBk LOCAL_VAR1,BK,OFF,2,2
448448
nill LOCAL_VAR1,3
449449
#else
450-
la LOCAL_VAR1,3(0,0)
450+
lghi LOCAL_VAR1,3
451451
NGR LOCAL_VAR1,BK /*refresh BK*/
452452
#endif
453453
jz .L2x2_BK_Store
@@ -497,7 +497,7 @@ ALIGN_4
497497
RefreshTempBk LOCAL_VAR1,BK,OFF,1,2
498498
nill LOCAL_VAR1,3
499499
#else
500-
la LOCAL_VAR1,3(0,0)
500+
lghi LOCAL_VAR1,3
501501
NGR LOCAL_VAR1,BK /*refresh BK*/
502502
#endif
503503
jz .L1x2_BK_Store
@@ -573,7 +573,7 @@ ALIGN_4
573573
RefreshTempBk LOCAL_VAR1,BK,OFF,4,1
574574
nill LOCAL_VAR1,3
575575
#else
576-
la LOCAL_VAR1,3(0,0)
576+
lghi LOCAL_VAR1,3
577577
NGR LOCAL_VAR1,BK /*refresh BK*/
578578
#endif
579579
jz .L4x1_BK_Store
@@ -625,7 +625,7 @@ ALIGN_4
625625
RefreshTempBk LOCAL_VAR1,BK,OFF,2,1
626626
nill LOCAL_VAR1,3
627627
#else
628-
la LOCAL_VAR1,3(0,0)
628+
lghi LOCAL_VAR1,3
629629
NGR LOCAL_VAR1,BK /*refresh BK*/
630630
#endif
631631
jz .L2x1_BK_Store
@@ -675,7 +675,7 @@ ALIGN_4
675675
RefreshTempBk LOCAL_VAR1,BK,OFF,1,1
676676
nill LOCAL_VAR1,3
677677
#else
678-
la LOCAL_VAR1,3(0,0)
678+
lghi LOCAL_VAR1,3
679679
NGR LOCAL_VAR1,BK /*refresh BK*/
680680
#endif
681681
jz .L1x1_BK_Store

0 commit comments

Comments
 (0)