@@ -123,7 +123,7 @@ func init() {
123
123
124
124
// Common individual register masks
125
125
var (
126
- gp = buildReg ("R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R15 R16 R17 R18 R19 R20 R23 R24 R25 R26 R27 R28 R29 R31" ) // R1 is LR, R2 is thread pointer, R3 is stack pointer, R21-unused , R22 is g, R30 is REGTMP
126
+ gp = buildReg ("R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R15 R16 R17 R18 R19 R20 R21 R23 R24 R25 R26 R27 R28 R29 R31" ) // R1 is LR, R2 is thread pointer, R3 is stack pointer, R22 is g, R30 is REGTMP
127
127
gpg = gp | buildReg ("g" )
128
128
gpsp = gp | buildReg ("SP" )
129
129
gpspg = gpg | buildReg ("SP" )
@@ -283,22 +283,22 @@ func init() {
283
283
// arg1 = mem
284
284
// auxint = offset into duffzero code to start executing
285
285
// returns mem
286
- // R19 aka loong64.REGRT1 changed as side effect
286
+ // R20 aka loong64.REGRT1 changed as side effect
287
287
{
288
288
name : "DUFFZERO" ,
289
289
aux : "Int64" ,
290
290
argLength : 2 ,
291
291
reg : regInfo {
292
- inputs : []regMask {buildReg ("R19 " )},
293
- clobbers : buildReg ("R19 R1" ),
292
+ inputs : []regMask {buildReg ("R20 " )},
293
+ clobbers : buildReg ("R20 R1" ),
294
294
},
295
295
typ : "Mem" ,
296
296
faultOnNilArg0 : true ,
297
297
},
298
298
299
299
// duffcopy
300
- // arg0 = address of dst memory (in R20 , changed as side effect) REGRT2
301
- // arg1 = address of src memory (in R19 , changed as side effect) REGRT1
300
+ // arg0 = address of dst memory (in R21 , changed as side effect)
301
+ // arg1 = address of src memory (in R20 , changed as side effect)
302
302
// arg2 = mem
303
303
// auxint = offset into duffcopy code to start executing
304
304
// returns mem
@@ -307,54 +307,54 @@ func init() {
307
307
aux : "Int64" ,
308
308
argLength : 3 ,
309
309
reg : regInfo {
310
- inputs : []regMask {buildReg ("R20 " ), buildReg ("R19 " )},
311
- clobbers : buildReg ("R19 R20 R1" ),
310
+ inputs : []regMask {buildReg ("R21 " ), buildReg ("R20 " )},
311
+ clobbers : buildReg ("R20 R21 R1" ),
312
312
},
313
313
typ : "Mem" ,
314
314
faultOnNilArg0 : true ,
315
315
faultOnNilArg1 : true ,
316
316
},
317
317
318
318
// large or unaligned zeroing
319
- // arg0 = address of memory to zero (in R19 , changed as side effect)
319
+ // arg0 = address of memory to zero (in R20 , changed as side effect)
320
320
// arg1 = address of the last element to zero
321
321
// arg2 = mem
322
322
// auxint = alignment
323
323
// returns mem
324
- // MOVx R0, (R19 )
325
- // ADDV $sz, R19
326
- // BGEU Rarg1, R19 , -2(PC)
324
+ // MOVx R0, (R20 )
325
+ // ADDV $sz, R20
326
+ // BGEU Rarg1, R20 , -2(PC)
327
327
{
328
328
name : "LoweredZero" ,
329
329
aux : "Int64" ,
330
330
argLength : 3 ,
331
331
reg : regInfo {
332
- inputs : []regMask {buildReg ("R19 " ), gp },
333
- clobbers : buildReg ("R19 " ),
332
+ inputs : []regMask {buildReg ("R20 " ), gp },
333
+ clobbers : buildReg ("R20 " ),
334
334
},
335
335
typ : "Mem" ,
336
336
faultOnNilArg0 : true ,
337
337
},
338
338
339
339
// large or unaligned move
340
- // arg0 = address of dst memory (in R20 , changed as side effect)
341
- // arg1 = address of src memory (in R19 , changed as side effect)
340
+ // arg0 = address of dst memory (in R21 , changed as side effect)
341
+ // arg1 = address of src memory (in R20 , changed as side effect)
342
342
// arg2 = address of the last element of src
343
343
// arg3 = mem
344
344
// auxint = alignment
345
345
// returns mem
346
- // MOVx (R19), Rtmp
347
- // MOVx Rtmp, (R20)
348
- // ADDV $sz, R19
346
+ // MOVx (R20), Rtmp
347
+ // MOVx Rtmp, (R21)
349
348
// ADDV $sz, R20
350
- // BGEU Rarg2, R19, -4(PC)
349
+ // ADDV $sz, R21
350
+ // BGEU Rarg2, R20, -4(PC)
351
351
{
352
352
name : "LoweredMove" ,
353
353
aux : "Int64" ,
354
354
argLength : 4 ,
355
355
reg : regInfo {
356
- inputs : []regMask {buildReg ("R20 " ), buildReg ("R19 " ), gp },
357
- clobbers : buildReg ("R19 R20" ),
356
+ inputs : []regMask {buildReg ("R21 " ), buildReg ("R20 " ), gp },
357
+ clobbers : buildReg ("R20 R21 " ),
358
358
},
359
359
typ : "Mem" ,
360
360
faultOnNilArg0 : true ,
0 commit comments