standalone: -s to set codegen size_t & ./check_demo.sh to test both 32-bits and 64-bits #468

Closed
lyken wants to merge 1 commits from standalone-any-size-t into master
Collaborator

Check NAC3 code generator in both 32-bits and 64-bits.

A lot of new 32-bit specific errors are revealed with ./check_demos.sh. New issue on each of them later.

Check NAC3 code generator in both 32-bits and 64-bits. A ***lot*** of new 32-bit specific errors are revealed with `./check_demos.sh`. New issue on each of them later.
lyken requested review from sb10q 2024-07-21 15:23:21 +08:00
lyken changed title from standalone: -s to set codegen size_t & ./check_demo.sh to test both 32-bits and 64-bits to WIP: standalone: -s to set codegen size_t & ./check_demo.sh to test both 32-bits and 64-bits 2024-07-21 15:29:21 +08:00
lyken changed title from WIP: standalone: -s to set codegen size_t & ./check_demo.sh to test both 32-bits and 64-bits to standalone: -s to set codegen size_t & ./check_demo.sh to test both 32-bits and 64-bits 2024-07-21 15:29:59 +08:00
Author
Collaborator

Thought there is a critical error in the PR.
Please ignore the title changes.

Thought there is a critical error in the PR. Please ignore the title changes.
sb10q reviewed 2024-07-21 19:19:20 +08:00
@ -249,0 +261,4 @@
// Check `size_t_bits`
if !(size_t_bits == 32 || size_t_bits == 64) {
println!("size_t_bits cannot be {size_t_bits}. Must be 32 or 64.");
return; // Terminate
Owner

These two comments are obvious, remove.

These two comments are obvious, remove.
sb10q reviewed 2024-07-21 19:20:34 +08:00
@ -25,1 +18,4 @@
# Run the .py with an actual Python interpreter.
# This is the test oracle.
echo ">>>>>> Running $demo with the Python interpreter to get test answers"
Owner

reference output

reference output
sb10q reviewed 2024-07-21 19:20:55 +08:00
@ -26,0 +21,4 @@
echo ">>>>>> Running $demo with the Python interpreter to get test answers"
./interpret_demo.py "$demo" > interpreted.log
# Test NAC3 on 32-bits and 64-bits code output, with and without --lli,
Owner

Obviously

Obviously
sb10q reviewed 2024-07-21 19:21:41 +08:00
@ -74,2 +74,4 @@
mcpu: Option<String>,
/// The number of bits of `size_t` of the NAC3 code generator.
// NOTE: Don't set a default value (e.g., `default_value = usize::BITS`). Force the user to specify to make it clear to them the `size_t` they will be using.
Owner

No, the default should be host machine dependent. GCC doesn't force you to set one.

No, the default should be host machine dependent. GCC doesn't force you to set one.
lyken force-pushed standalone-any-size-t from 38b1567e10 to 15f4cc79c4 2024-07-21 20:07:21 +08:00 Compare
Author
Collaborator

Revised

Revised
Collaborator

I would suggest using -m32 and -m64 instead to conform with GCC/Clang.

I would suggest using `-m32` and `-m64` instead to conform with GCC/Clang.
Owner

Can we close this?

Can we close this?
Author
Collaborator

Sure

Sure
sb10q closed this pull request 2024-07-27 21:58:02 +08:00
Author
Collaborator

NOTE: #477 has made this PR redundant.

NOTE: https://git.m-labs.hk/M-Labs/nac3/pulls/477 has made this PR redundant.

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#468
No description provided.