Commit fdfe59fd authored by Arjan Oortgiese's avatar Arjan Oortgiese

Fix for 32-bit with PIC flag (e.g. Android).

parent 9833c71c
......@@ -64,7 +64,10 @@ get_thunk_arity_64 a = code {
load_si32 -4
}
get_thunk_descriptor a :== IF_INT_64_OR_32 (get_thunk_descriptor_64_platform a) (get_thunk_descriptor_32 a);
get_thunk_descriptor a :== IF_INT_64_OR_32 (get_thunk_descriptor_64_platform a) (get_thunk_descriptor_32_platform a);
get_thunk_descriptor_32_platform :: !Int -> Int;
get_thunk_descriptor_32_platform a = if (is_using_desc_relative_to_array == 0) (get_thunk_descriptor_32 a) (get_thunk_descriptor_32_PIC a);
get_thunk_descriptor_64_platform :: !Int -> Int;
get_thunk_descriptor_64_platform a = if (not isMacOS) (get_thunk_descriptor_64 a) (get_thunk_descriptor_64_MacOS a);
......@@ -88,6 +91,15 @@ get_thunk_descriptor_32 a = code {
load_i -8
}
get_thunk_descriptor_32_PIC :: !Int -> Int;
get_thunk_descriptor_32_PIC a = code {
push_b 0
load_i -8
addI
pushI -8
addI
}
is_Int_D :: !Int -> Bool;
is_Int_D d = code inline {
eq_desc_b INT 0
......
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