diff --git a/gas/config/tc-esp32ulp_esp32s2.c b/gas/config/tc-esp32ulp_esp32s2.c index 9bb0d2281cdf..4c76f47fbd4c 100644 --- a/gas/config/tc-esp32ulp_esp32s2.c +++ b/gas/config/tc-esp32ulp_esp32s2.c @@ -347,7 +347,7 @@ esp32ulp_cmd_jump_rels_esp32s2 (Expr_Node * step, Expr_Node * thresh, int step_val = EXPR_VALUE (step); int thresh_val = EXPR_VALUE (thresh); { - unsigned int local_op = I_JUMP_RELS (thresh_val, cond, step_val); + unsigned int local_op = I_JUMP_RELS (thresh_val, cond, step_val >> 2); INSTR_T result = conscode (gencode (local_op), conctcode (Expr_Node_Gen_Reloc (step, diff --git a/gas/testsuite/gas/esp32ulp/esp32s2/compare/esp32s2ulp_jump.bin b/gas/testsuite/gas/esp32ulp/esp32s2/compare/esp32s2ulp_jump.bin index 39139ab85458..89c507ae9699 100755 Binary files a/gas/testsuite/gas/esp32ulp/esp32s2/compare/esp32s2ulp_jump.bin and b/gas/testsuite/gas/esp32ulp/esp32s2/compare/esp32s2ulp_jump.bin differ diff --git a/gas/testsuite/gas/esp32ulp/esp32s2/compare/esp32s2ulp_jump.lst b/gas/testsuite/gas/esp32ulp/esp32s2/compare/esp32s2ulp_jump.lst index 5e5801fe7d40..7d9fff812867 100644 --- a/gas/testsuite/gas/esp32ulp/esp32s2/compare/esp32s2ulp_jump.lst +++ b/gas/testsuite/gas/esp32ulp/esp32s2/compare/esp32s2ulp_jump.lst @@ -87,8 +87,8 @@ ESP32ULP GAS esp32s2ulp_jump.s page 1 69 0000DE82 70 71 // Jumps commands... - 72 00f0 04001288 jumps 0x4, 0x04, EQ - 73 00f4 04001288 jumps 0x04, check_thres1, EQ + 72 00f0 04000688 jumps 0x4, 0x04, EQ + 73 00f4 04000688 jumps 0x04, check_thres1, EQ 74 00f8 0400EA8A jumps check_jump1, check_thres1, EQ 75 00fc 0000EE8A jumps check_jump1, check_thres2, EQ 76 0100 0400F28A jumps check_jump2, check_thres1, EQ @@ -111,8 +111,8 @@ ESP32ULP GAS esp32s2ulp_jump.s page 1 91 00000A82 92 93 //jumps with negative offset - 94 0138 0000128A jumps -0x4, 0x00, EQ - 95 013c 0080108A jumps -0x4, 0x00, LT - 96 0140 0080118A jumps -0x4, 0x00, GT - 97 0144 0080128A jumps -0x4, 0x00, LE - 98 0148 0080138A jumps -0x4, 0x00, GE + 94 0138 0000068A jumps -0x4, 0x00, EQ + 95 013c 0080048A jumps -0x4, 0x00, LT + 96 0140 0080058A jumps -0x4, 0x00, GT + 97 0144 0080068A jumps -0x4, 0x00, LE + 98 0148 0080078A jumps -0x4, 0x00, GE