Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repair pb loading for big-endian architectures #741

Merged
merged 2 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions c/fasl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2159,9 +2159,10 @@ void S_swap_dounderflow_header_endian(ptr co)
/* The `dounderflow` library entry starts with a header, so
it does not have a `pb_adr` instruction before. We need
to finish swapping the header's `ptr`-sized values, but
the mv-return address is already linked, so the only
thing to fix turns out to be the first `ptr`. */
uint32_t *code = (uint32_t *)&CODEIT(co, 0);
the mv-return address is already linked, and the live mask
and frame size are 0, so the only thing to fix turns out
to be the toplink `uptr`. */
uint32_t *code = (uint32_t *)&RPHEADERTOPLINK(TO_PTR(&CODEIT(co, 0)));
uint32_t a = code[0];
uint32_t b = code[1];
code[0] = b;
Expand Down
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ case "${CONFIG_UNAME}" in
m64=arm64osx
tm64=tarm64osx
elif uname -m | egrep 'Power' > /dev/null 2>&1 ; then
m64=ppc32osx
tm64=tppc32osx
m32=ppc32osx
tm32=tppc32osx
pbendian=b
default_warning_flags=""
fi
Expand Down