Skip to content

Commit

Permalink
Ensure DS-form offset is a multiple of 4
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed Apr 21, 2021
1 parent 3e5d8c7 commit 4876463
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ Working version
- #10244: Optimise Int32.unsigned_to_int
(Fabian Hemmer, review by Stephen Dolan and Xavier Leroy)

- #10302, #10303: Fix incorrect instruction selection for string constant loads
on ppc.
(David Allsopp, review by ???)

- #10349: Fix destroyed_at_c_call on RISC-V
(Mark Shinwell, review by Nicolás Ojeda Bär)

Expand Down
7 changes: 6 additions & 1 deletion asmcomp/power/emit.mlp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,12 @@ let emit_load_store instr addressing_mode addr n arg =
let (lo, hi) = low_high_s d in
if hi <> 0 then
` addis 11, 11, {emit_int hi}\n`;
` {emit_string instr} {emit_reg arg}, {emit_int lo}(11)\n`
if valid_offset instr lo then
` {emit_string instr} {emit_reg arg}, {emit_int lo}(11)\n`
else begin
` li 0, {emit_int lo}\n`;
` {emit_string instr}x {emit_reg arg}, 11, 0\n`
end
end
| Iindexed ofs ->
if is_immediate ofs && valid_offset instr ofs then
Expand Down

0 comments on commit 4876463

Please sign in to comment.