Commit f7858fbc authored by Erin van der Veen's avatar Erin van der Veen

Use non-machine instruction version of set_return_code.icl

parent 3108a8bc
implementation module set_return_code
import Platform
import StdInt
set_return_code_world :: !Int !*World -> *World
set_return_code_world i world = IF_ARM (set_return_code_world_arm i world) (set_return_code_world_intel i world)
set_return_code_world i world = IF_INT_64_OR_32 (set_return_code_world_64 i world) (set_return_code_world_32 i world)
set_return_code_world_intel :: !Int !*World -> *World
set_return_code_world_intel i world = IF_INT_64_OR_32 (set_return_code_world_intel_64 i world) (set_return_code_world_intel_32 i world)
set_return_code_world_arm :: !Int !*World -> *World
set_return_code_world_arm i world = IF_INT_64_OR_32 (set_return_code_world_arm_64 i world) (set_return_code_world_arm_32 i world)
set_return_code_world_intel_64 :: !Int !*World -> *World
set_return_code_world_intel_64 i world = code {
pushI 0
pushLc return_code
:xxx
pop_b 3
| mov dword ptr [rbx+r10],eax
instruction 66
instruction 137
instruction 4
instruction 19
fill_a 0 1
pop_a 1
}
set_return_code_world_intel_32 :: !Int !*World -> *World
set_return_code_world_intel_32 i world = code {
fill_a 0 1
pop_a 1
pushI 0
pushLc return_code
:xxx
pop_b 3
| mov (%esp),%edx
instruction 139
instruction 20
instruction 36
| movl %edx,(%eax,%ebx,1)
instruction 137
instruction 20
instruction 24
}
set_return_code_world_arm_64 :: !Int !*World -> *World
set_return_code_world_arm_64 i world = code {
set_return_code_world_64 :: !Int !*World -> *World
set_return_code_world_64 i world = code {
pushI 0xffffffff
and%
pushLc return_code
......@@ -79,8 +38,8 @@ set_return_code_world_arm_64 i world = code {
pop_a 2
}
set_return_code_world_arm_32 :: !Int !*World -> *World
set_return_code_world_arm_32 i world = code {
set_return_code_world_32 :: !Int !*World -> *World
set_return_code_world_32 i world = code {
pushI -4
pushLc return_code
addI
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment