Implement core_log
and rtio_log
to ARTIQ
#488
@ -8,12 +8,15 @@ if [ -z "$1" ]; then
|
||||
fi
|
||||
|
||||
declare -a nac3args
|
||||
while [ $# -ge 2 ]; do
|
||||
while [ $# -gt 1 ]; do
|
||||
case "$1" in
|
||||
--help)
|
||||
echo "Usage: check_demo.sh [-i686] -- demo [NAC3ARGS...]"
|
||||
echo "Usage: check_demo.sh [--debug] [-i686] -- [NAC3ARGS...] demo"
|
||||
exit
|
||||
;;
|
||||
--debug)
|
||||
debug=1
|
||||
;;
|
||||
-i686)
|
||||
i686=1
|
||||
;;
|
||||
@ -22,18 +25,18 @@ while [ $# -ge 2 ]; do
|
||||
break
|
||||
;;
|
||||
*)
|
||||
break
|
||||
echo "Unrecognized argument \"$1\""
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
demo="$1"
|
||||
shift
|
||||
while [ $# -gt 1 ]; do
|
||||
nac3args+=("$1")
|
||||
shift
|
||||
done
|
||||
demo="$1"
|
||||
|
||||
|
||||
echo "### Checking $demo..."
|
||||
@ -43,12 +46,20 @@ echo ">>>>>> Running $demo with the Python interpreter"
|
||||
|
||||
if [ -n "$i686" ]; then
|
||||
echo "...... Trying NAC3's 32-bit code generator output"
|
||||
./run_demo.sh -i686 --out run_32.log "${nac3args[@]}" "$demo"
|
||||
if [ -n "$debug" ]; then
|
||||
./run_demo.sh --debug -i686 --out run_32.log -- "${nac3args[@]}" "$demo"
|
||||
else
|
||||
./run_demo.sh -i686 --out run_32.log -- "${nac3args[@]}" "$demo"
|
||||
fi
|
||||
diff -Nau interpreted.log run_32.log
|
||||
fi
|
||||
|
||||
echo "...... Trying NAC3's 64-bit code generator output"
|
||||
./run_demo.sh --out run_64.log "${nac3args[@]}" "$demo"
|
||||
if [ -n "$debug" ]; then
|
||||
./run_demo.sh --debug --out run_64.log -- "${nac3args[@]}" "$demo"
|
||||
else
|
||||
./run_demo.sh --out run_64.log -- "${nac3args[@]}" "$demo"
|
||||
fi
|
||||
diff -Nau interpreted.log run_64.log
|
||||
|
||||
echo "...... OK"
|
||||
|
@ -2,6 +2,11 @@
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" == "--help" ]; then
|
||||
echo "Usage: check_demos.sh [CHECKARGS...] [--] [NAC3ARGS...]"
|
||||
exit
|
||||
fi
|
||||
|
||||
count=0
|
||||
for demo in src/*.py; do
|
||||
./check_demo.sh "$@" "$demo"
|
||||
|
@ -14,7 +14,7 @@ declare -a nac3args
|
||||
while [ $# -ge 1 ]; do
|
||||
case "$1" in
|
||||
--help)
|
||||
echo "Usage: run_demo.sh [--help] [--out OUTFILE] [--debug] [-i686] -- [NAC3ARGS...]"
|
||||
echo "Usage: run_demo.sh [--help] [--out OUTFILE] [--debug] [-i686] -- [NAC3ARGS...] demo"
|
||||
exit
|
||||
;;
|
||||
--out)
|
||||
@ -32,7 +32,8 @@ while [ $# -ge 1 ]; do
|
||||
break
|
||||
;;
|
||||
*)
|
||||
break
|
||||
echo "Unrecognized argument \"$1\""
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
@ -59,7 +60,7 @@ if [ -z "$i686" ]; then
|
||||
clang -c -std=gnu11 -Wall -Wextra -O3 -o demo.o demo.c
|
||||
clang -o demo module.o demo.o $DEMO_LINALG_STUB -lm -Wl,--no-warn-search-mismatch
|
||||
else
|
||||
$nac3standalone --triple i686-unknown-linux-gnu "${nac3args[@]}"
|
||||
$nac3standalone --triple i686-unknown-linux-gnu --target-features +sse2 "${nac3args[@]}"
|
||||
|
||||
clang -m32 -c -std=gnu11 -Wall -Wextra -O3 -msse2 -o demo.o demo.c
|
||||
clang -m32 -o demo module.o demo.o $DEMO_LINALG_STUB32 -lm -Wl,--no-warn-search-mismatch
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user
@abdul124 I thought you said this sse2 option was no longer required when using i686 instead of i386?
sse2 should be enforced by default on rustc i686 target https://github.com/rust-lang/rust/issues/82435#issuecomment-783939789
Okay, but that comment is about Rust, not LLVM. nac3 is only using the latter here.
LLVM does interpret "i686" as implying sse2 for most part (Debian LLVM requires patch though). This commit
56d3ad9d23
describes the LLVM situation for sse2 support on LLVM i686 target.So the present change should be reverted i.e. there is no need to add
--target-features +sse2
?Yes, since the feature is already implied by i686 target,
--target-feature +sse2
is redundant.I don't think any of that is true. The reason why BoringSSL requires SSE2 on i686 targets is because (from the commit message)
So it should be seen as OpenSSL's own project requirements, rather than a behavior of the compiler.
In fact, the quoted issue in LLVM's repo says that while SSE2 support is implied by
i686
, it is ultimately treated as ani386
target.When compiling without any flags, all below
f
-prefixed instructions are from the X87 ISA (List of X87 Instructions).With
--target-features +sse2
, all the above X87 instructions are replaced with their SSE2 counterparts (note the use ofxmm
registers):This also explains the test failures when removing
--target-features +sse2
withsrc/mandelbrot.py
.