diff options
author | Maciej W. Rozycki <macro@orcam.me.uk> | 2024-07-13 06:00:43 +0100 |
---|---|---|
committer | Maciej W. Rozycki <macro@orcam.me.uk> | 2024-07-13 06:00:43 +0100 |
commit | 61022df13c766266c17e44e121cda057ce59382e (patch) | |
tree | 4cae80e4c234f6eac4baec5a18fbc12bed896ce6 | |
parent | 7478277414bf2ef6a711e7cb3120ff16f417c871 (diff) | |
download | binutils-61022df13c766266c17e44e121cda057ce59382e.zip binutils-61022df13c766266c17e44e121cda057ce59382e.tar.gz binutils-61022df13c766266c17e44e121cda057ce59382e.tar.bz2 |
Revert "MIPS/GAS: Omit LI 0 for condition trap"
This reverts commit bfa257b407270d1c808b31fbd97da779e0fd20d2. It was
applied unapproved.
-rw-r--r-- | gas/config/tc-mips.c | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/cond-trap-imm-zero.d | 16 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/cond-trap-imm-zero.s | 9 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/mips.exp | 2 |
4 files changed, 3 insertions, 35 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 863f56d..8f54cb8 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -13815,14 +13815,9 @@ macro (struct mips_cl_insn *ip, char *str) case M_TNE_I: s = "tne"; trap: - if (imm_expr.X_add_number != 0) - { - used_at = 1; - load_register (AT, &imm_expr, GPR_SIZE == 64); - macro_build (NULL, s, "s,t", op[0], AT); - } - else - macro_build (NULL, s, "s,t", op[0], ZERO); + used_at = 1; + load_register (AT, &imm_expr, GPR_SIZE == 64); + macro_build (NULL, s, "s,t", op[0], AT); break; case M_TRUNCWS: diff --git a/gas/testsuite/gas/mips/cond-trap-imm-zero.d b/gas/testsuite/gas/mips/cond-trap-imm-zero.d deleted file mode 100644 index 39d4c96..0000000 --- a/gas/testsuite/gas/mips/cond-trap-imm-zero.d +++ /dev/null @@ -1,16 +0,0 @@ -#objdump: -dr -#name: Condition Trap convert IMM0 to REG0 (MIPSr6) -#as: -32 - -.*: +file format .* - -Disassembly of section \.text: - -00000000 <f>: - 0: 00c00034 teq a2,zero - 4: 00c00030 tge a2,zero - 8: 00c00031 tgeu a2,zero - c: 00c00032 tlt a2,zero - 10: 00c00033 tltu a2,zero - 14: 00c00036 tne a2,zero - \.\.\. diff --git a/gas/testsuite/gas/mips/cond-trap-imm-zero.s b/gas/testsuite/gas/mips/cond-trap-imm-zero.s deleted file mode 100644 index 84cc7f1f..0000000 --- a/gas/testsuite/gas/mips/cond-trap-imm-zero.s +++ /dev/null @@ -1,9 +0,0 @@ - .set noreorder - .set nomacro -f: - teq $6,0 - tge $6,0 - tgeu $6,0 - tlt $6,0 - tltu $6,0 - tne $6,0 diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index c5d7453..acb7fb8 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -2180,6 +2180,4 @@ if { [istarget mips*-*-vxworks*] } { if [istarget *-*-irix*] { run_dump_test "irix-no-pdr" } - - run_dump_test_arches "cond-trap-imm-zero" [mips_arch_list_matching mips32r6] } |