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

Support native Arm32 bootstrapping #90

Merged
merged 1 commit into from
Dec 12, 2023
Merged

Conversation

jserv
Copy link
Collaborator

@jserv jserv commented Dec 11, 2023

When bootstrapping on a native Arm32 host, qemu-arm is unnecessary. Therefore, in this configuration, we disregard ARM_EXEC.

@jserv jserv requested a review from vacantron December 11, 2023 20:21
@jserv
Copy link
Collaborator Author

jserv commented Dec 11, 2023

@vacantron, The Raspberry Pi 3 represents a unique scenario. Its foundational architecture is rooted in Armv8-A; however, it possesses the inherent ability to directly execute Aarch32 programs. This is due to its dual support for both A64 and A32 instruction sets. Kindly verify if this examination suffices for differentiation.

@jserv
Copy link
Collaborator Author

jserv commented Dec 11, 2023

The proposed change on an emulated Debian/Arm32 causes the following error:

tests/driver.sh: line 16:   708 Segmentation fault      "$SHECC" -o "$tmp_exe" "$tmp_in"
int main(int argc, int argv) { int x; x=0; do {x = x + 1; break;} while (1); return x; } => 1 expected, but got 0
input: /tmp/tmp.0FeGO67p2r.c
executable: /tmp/tmp.aoTvmAkSFV

@vacantron
Copy link
Collaborator

vacantron commented Dec 11, 2023

@vacantron, The Raspberry Pi 3 represents a unique scenario. Its foundational architecture is rooted in Armv8-A; however, it possesses the inherent ability to directly execute Aarch32 programs. This is due to its dual support for both A64 and A32 instruction sets. Kindly verify if this examination suffices for differentiation.

Yes, it works on Raspberry Pi 3B.

The proposed change on an emulated Debian/Arm32 causes the following error:

I use the image for armhf-virt on DQIB and run it on QEMU. There's no error occurred (and also on Raspberry Pi). Any further information for reproducing the error?

Also, the proposed changes should not change the behavior of shecc. Is the version correct?

@jserv
Copy link
Collaborator Author

jserv commented Dec 11, 2023

I use the image for armhf-virt on DQIB and run it on QEMU. There's no error occurred (and also on Raspberry Pi). Any further information for reproducing the error?

Here are the steps to reproduce:

  1. Fetch Debian image for armhf-virt and extract it.
  2. Boot into the armhf-virt environment and run apt-get update ; apt-get dist-upgrade ; apt-get install build-essential to get latest GNU toolchain. In my case, gcc version is 13.2.0 (Debian 13.2.0-8).
  3. Clone git repository of shecc and execute git checkout -b native-arm-bootstrapping origin/native-arm-bootstrapping
  4. Run make config and make check
  5. Then, I got the above messages.

@vacantron
Copy link
Collaborator

vacantron commented Dec 12, 2023

The proposed change on an emulated Debian/Arm32 causes the following error:

There's same error on the other platforms, but it only report the segmentation fault and not stop the checking. I had not noticed it until today. Fixed in #91 .

@jserv jserv merged commit d757888 into master Dec 12, 2023
6 checks passed
@jserv jserv deleted the native-arm-bootstrapping branch December 12, 2023 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants