properly return a value

on aarch64, returning a big value does not happen with a pointer passed as the first argument (x0). The pointer is passed in the return register (x8) instead. Just use a zig return to generate the right code in both cases
This commit is contained in:
Folkert 2023-10-08 16:24:00 +02:00
parent ea5632c437
commit c749efb64c
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -1857,13 +1857,12 @@ const CountAndStart = extern struct {
};
pub fn fromUtf8RangeC(
output: *FromUtf8Result,
list: RocList,
start: usize,
count: usize,
update_mode: UpdateMode,
) callconv(.C) void {
output.* = @call(.{ .modifier = always_inline }, fromUtf8Range, .{ list, start, count, update_mode });
) callconv(.C) FromUtf8Result {
return fromUtf8Range(list, start, count, update_mode);
}
pub fn fromUtf8Range(arg: RocList, start: usize, count: usize, update_mode: UpdateMode) FromUtf8Result {