fix bigint shift tests
[openpower-isa.git] / jit_test.sh
1 #!/bin/bash
2 set -xe
3 clang --target=powerpc64le-linux-gnu -Og -g -c -o jit_test.o jit_test.cpp
4 powerpc64le-linux-gnu-objcopy --set-section-flags .wtext=CONTENTS,ALLOC,LOAD,CODE jit_test.o
5 powerpc64le-linux-gnu-gcc -static -o jit_test jit_test.o
6 set +e
7 for i in {-3..3}; do
8 printf -v ih "%#x" "$i"
9 for j in {-3..3}; do
10 printf -v jh "%#x" "$j"
11 ./jit_test "$ih" "$jh"
12 echo "return value $? -- should be $(((i + j) & 0xFF))"
13 done
14 done