vyoma-systems / zilsd

0 stars 0 forks source link

address misaligned exception seen on ld for rs1 == rd #2

Closed kumaransvyoma closed 3 months ago

kumaransvyoma commented 3 months ago

ld misaligned with spike for aligned address:

ld_test.zip

**test:**
  la s2,rvtest_data
diff_reg:
  ld s4,0(s2)
same_reg:
  ld s2,0(s2)

**disassembly:**
80000124:   ee090913            add s2,s2,-288 # 80002000 <rvtest_data_begin>
80000128 <diff_reg>:
80000128:   00093a03            .insn   4, 0x00093a03
8000012c <same_reg>:
8000012c:   00093903            .insn   4, 0x00093903

To reproduce the issue

# compile
clang -march=rv32izilsd          -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles  -T ./env/link.ld      -I ./env -mabi=ilp32  ./ld-01.S -o my.elf -DTEST_CASE_1=True -DXLEN=32
# To execute 
spike --log-commits --log spike.log  --isa=rv32iZilsd  my.elf
christian-herber-nxp commented 3 months ago

should be fixed with 9c7b983

lavanyajagan commented 3 months ago

fix verified