Skip to content

Commit

Permalink
#386 : fixing bytecodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksey Rakov committed Feb 8, 2022
1 parent 29a2e1b commit a50f6d0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
31 changes: 21 additions & 10 deletions asm/aarch64/core60.asm
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,16 @@ end
// ; storefp
inline %0A1h

str x10, [x29, __arg9_1]
add x11, x29, __arg12_1
str x10, [x11]

end

// ; savesi
inline %0A2h

str x9, [sp, __arg9_1]
add x11, sp, __arg12_1
str x9, [x11]

end

Expand Down Expand Up @@ -200,7 +202,8 @@ end
// ; peekfi
inline %0A8h

ldr x10, [x29, __arg9_1]
add x11, x29, __arg12_1
ldr x10, [x11]

end

Expand Down Expand Up @@ -308,7 +311,8 @@ inline %0F1h
movz x11, __ptr32lo_1
movk x11, __ptr32hi_1, lsl #16

str x11, [sp, __arg9_1]
add x12, sp, __arg12_1
str x11, [x12]

end

Expand Down Expand Up @@ -433,36 +437,43 @@ end
// ; movsifi
inline %0F3h

ldr x11, [x29, __arg12_1]
str x11, [sp, __arg12_2]
add x12, x29, __arg12_1
add x13, sp, __arg12_2

ldr x11, [x12]
str x11, [x13]

end

// ; movsifi sp:0, fp:i2
inline %1F3h

ldr x0, [x29, __arg12_1]
add x12, x29, __arg12_1
ldr x0, [x12]

end

// ; movsifi sp:1, fp:i2
inline %2F3h

ldr x1, [x29, __arg12_1]
add x12, x29, __arg12_1
ldr x1, [x12]

end

// ; movsifi sp:2, fp:i2
inline %3F3h

ldr x2, [x29, __arg12_1]
add x12, x29, __arg12_1
ldr x2, [x12]

end

// ; movsifi sp:3, fp:i2
inline %4F3h

ldr x3, [x29, __arg12_1]
add x12, x29, __arg12_1
ldr x3, [x12]

end

Expand Down
2 changes: 1 addition & 1 deletion elenasrc3/tools/asmc/armassembler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ bool Arm64Assembler :: compileSTR(ScriptToken& tokenInfo, ARMOperand rt, ARMOper
writer.writeDWord(ARMHelper::makeImm9Opcode(3, 7, 0, 0, 0, 0, ptr.imm, 1, ptr.type, rt.type));
}
else if (rt.isXR() && ptr.isUnsigned()) {
writer.writeDWord(ARMHelper::makeImm12Opcode(3, 7, 0, 1, 1, ptr.imm >> 3, ptr.type, rt.type));
writer.writeDWord(ARMHelper::makeImm12Opcode(3, 7, 0, 1, 0, ptr.imm >> 3, ptr.type, rt.type));
}
else return false;

Expand Down

0 comments on commit a50f6d0

Please sign in to comment.