Skip to content

Commit 5169996

Browse files
committed
fix use of treg field in i_move instruction to match binutils-esp32 output in all cases
This fix makes compat tests pass for: https://github.com/duff2013/ulptool/blob/master/src/ulp_examples/ulp_rtc_gpio/rtcio.s
1 parent 13049da commit 5169996

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

esp32_ulp/opcodes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ def i_move(reg_dest, reg_imm_src):
482482
if src.type == REG:
483483
_alu_reg.dreg = dest
484484
_alu_reg.sreg = src.value
485-
_alu_reg.treg = 1 # XXX undocumented, this is the value binutils-esp32 uses
485+
_alu_reg.treg = src.value # XXX undocumented, this is the value binutils-esp32 uses
486486
_alu_reg.unused = 0
487487
_alu_reg.sel = ALU_SEL_MOV
488488
_alu_reg.sub_opcode = SUB_OPCODE_ALU_REG

tests/02_compat_rtc_tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ for src_file in ulptool/src/ulp_examples/*/*.s binutils-esp32ulp/gas/testsuite/g
6666
test_name="${src_name##*/}"
6767

6868
# for now, skip files that contain known bugs in esp32_ulp (essentially a todo list of what to fix)
69-
for I in rtcio esp32ulp_all esp32ulp_globals esp32ulp_jumpr esp32ulp_ranges test_reg; do
69+
for I in esp32ulp_all esp32ulp_globals esp32ulp_jumpr esp32ulp_ranges test_reg; do
7070
if [ "${test_name}" = "$I" ]; then
7171
# these are old bugs, and not related to the RTC macro handling functionality
7272
# they will still be great to fix over time

0 commit comments

Comments
 (0)