-
Notifications
You must be signed in to change notification settings - Fork 261
Runtime assertion error in asm translation tests on arm-unknown-linux-gnueabihf
#431
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
Comments
I think I misunderstood the We should fix the test, but ideally using this instruction in a way that does write to memory, since this test case was intended to verify memory accesses to inline asm operands. |
Is there a reason we need to test |
We were testing the translation of assembly operands with the |
arm-unknown-linux-gnueabihf
arm-unknown-linux-gnueabihf
arm-unknown-linux-gnueabihf
tests/asm.arm/
fails its tests (at runtime).When running
./scripts/test_translator.py tests/ --only-directories asm.arm
on #429 (which cross-compiles usingcargo zigbuild
andzig cc
and runs underqemu
), there is an assertion error:where this is the code in
tests/asm.arm/src/test_asm.rs
:and where this is line 26:
That is,
entry
andrust_entry
, and also__STREXB
andrust___STREXB
give equal results, implying the translation is correct, but then they are both different from the expected results, which is 5 instead of 0. I'm not sure where the 5 here comes from, and I don't know enough aboutstrexb
or inline asm to know if it's correct. Maybe the emulation is not correct? Or maybe the 5 is just wrong?For reference, here are the inline asm functions:
This could be an error caused by cross-compilation and emulation as opposed to the transpiler, but I don't know enough about inline asm and
strexb
to tell. I did see, however, thatrust___STREXB
gives the same results as the expected buffer,[5]
intests/asm.arm/src/test_asm.rs:18
, while it is the C__STREXB
that gives different results,[0]
.The text was updated successfully, but these errors were encountered: