diff options
Diffstat (limited to 'gcc/config/riscv/riscv.h')
-rw-r--r-- | gcc/config/riscv/riscv.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h index b191606edb4..b3eb6abc2aa 100644 --- a/gcc/config/riscv/riscv.h +++ b/gcc/config/riscv/riscv.h | |||
@@ -528,13 +528,10 @@ enum reg_class | |||
528 | (((VALUE) | ((1UL<<31) - IMM_REACH)) == ((1UL<<31) - IMM_REACH) \ | 528 | (((VALUE) | ((1UL<<31) - IMM_REACH)) == ((1UL<<31) - IMM_REACH) \ |
529 | || ((VALUE) | ((1UL<<31) - IMM_REACH)) + IMM_REACH == 0) | 529 | || ((VALUE) | ((1UL<<31) - IMM_REACH)) + IMM_REACH == 0) |
530 | 530 | ||
531 | /* If this is a single bit mask, then we can load it with bseti. But this | 531 | /* If this is a single bit mask, then we can load it with bseti. Special |
532 | is not useful for any of the low 31 bits because we can use addi or lui | 532 | handling of SImode 0x80000000 on RV64 is done in riscv_build_integer_1. */ |
533 | to load them. It is wrong for loading SImode 0x80000000 on rv64 because it | 533 | #define SINGLE_BIT_MASK_OPERAND(VALUE) \ |
534 | needs to be sign-extended. So we restrict this to the upper 32-bits | 534 | (pow2p_hwi (VALUE)) |
535 | only. */ | ||
536 | #define SINGLE_BIT_MASK_OPERAND(VALUE) \ | ||
537 | (pow2p_hwi (VALUE) && (ctz_hwi (VALUE) >= 32)) | ||
538 | 535 | ||
539 | /* Stack layout; function entry, exit and calling. */ | 536 | /* Stack layout; function entry, exit and calling. */ |
540 | 537 | ||