@@ -325,31 +325,31 @@ struct regMaskTP
325
325
bool IsRegNumInMask (regNumber reg);
326
326
};
327
327
328
- static regMaskTP operator ^(regMaskTP first, regMaskTP second)
328
+ static regMaskTP operator ^(const regMaskTP& first, const regMaskTP& second)
329
329
{
330
330
regMaskTP result (first.getLow () ^ second.getLow ());
331
331
return result;
332
332
}
333
333
334
- static regMaskTP operator &(regMaskTP first, regMaskTP second)
334
+ static regMaskTP operator &(const regMaskTP& first, const regMaskTP& second)
335
335
{
336
336
regMaskTP result (first.getLow () & second.getLow ());
337
337
return result;
338
338
}
339
339
340
- static regMaskTP operator |(regMaskTP first, regMaskTP second)
340
+ static regMaskTP operator |(const regMaskTP& first, const regMaskTP& second)
341
341
{
342
342
regMaskTP result (first.getLow () | second.getLow ());
343
343
return result;
344
344
}
345
345
346
- static regMaskTP& operator |=(regMaskTP& first, regMaskTP second)
346
+ static regMaskTP& operator |=(regMaskTP& first, const regMaskTP& second)
347
347
{
348
348
first = first | second;
349
349
return first;
350
350
}
351
351
352
- static regMaskTP& operator ^=(regMaskTP& first, regMaskTP second)
352
+ static regMaskTP& operator ^=(regMaskTP& first, const regMaskTP& second)
353
353
{
354
354
first = first ^ second;
355
355
return first;
@@ -361,18 +361,18 @@ static regMaskTP& operator^=(regMaskTP& first, const regNumber reg)
361
361
return first;
362
362
}
363
363
364
- static regMaskTP& operator &=(regMaskTP& first, regMaskTP second)
364
+ static regMaskTP& operator &=(regMaskTP& first, const regMaskTP& second)
365
365
{
366
366
first = first & second;
367
367
return first;
368
368
}
369
369
370
- static bool operator ==(regMaskTP first, regMaskTP second)
370
+ static bool operator ==(const regMaskTP& first, const regMaskTP& second)
371
371
{
372
372
return (first.getLow () == second.getLow ());
373
373
}
374
374
375
- static bool operator !=(regMaskTP first, regMaskTP second)
375
+ static bool operator !=(const regMaskTP& first, const regMaskTP& second)
376
376
{
377
377
return !(first == second);
378
378
}
@@ -408,18 +408,18 @@ static regMaskTP& operator<<=(regMaskTP& first, const int b)
408
408
}
409
409
#endif
410
410
411
- static regMaskTP operator ~(regMaskTP first)
411
+ static regMaskTP operator ~(const regMaskTP& first)
412
412
{
413
413
regMaskTP result (~first.getLow ());
414
414
return result;
415
415
}
416
416
417
- static uint32_t PopCount (regMaskTP value)
417
+ static uint32_t PopCount (const regMaskTP& value)
418
418
{
419
419
return BitOperations::PopCount (value.getLow ());
420
420
}
421
421
422
- static uint32_t BitScanForward (regMaskTP mask)
422
+ static uint32_t BitScanForward (const regMaskTP& mask)
423
423
{
424
424
return BitOperations::BitScanForward (mask.getLow ());
425
425
}
0 commit comments