aengelke / instrew

A high performance LLVM-based dynamic binary instrumentation framework
GNU Lesser General Public License v2.1
223 stars 36 forks source link

error: instruction requires: el3 #11

Closed xiaoniaoyouhuajiang closed 1 month ago

xiaoniaoyouhuajiang commented 6 months ago

I have cloned this repository and successfully executed 'meson build-Dbuildtype =release', when I executed ninja -C build to compiling,something went wrong like this:

FAILED: subprojects/rellume/tests/parsed_cases_aarch64.txt 
/usr/bin/python3 ../subprojects/rellume/tests/test_parser.py -o subprojects/rellume/tests/parsed_cases_aarch64.txt -a /home/xiao-sa/software/instrew/build/subprojects/rellume/tests/test_assembler -A aarch64 ../subprojects/rellume/tests/a64_data_proc.txt ../subprojects/rellume/tests/a64_loads_stores.txt ../subprojects/rellume/tests/a64_branches_and_cond.txt ../subprojects/rellume/tests/a64_scalar_fp.txt ../subprojects/rellume/tests/a64_simd.txt
error: instruction requires: el3
 smc #0
 ^
error parsing line 4 non-hexadecimal number found in fromhex() arg at position 0
Traceback (most recent call last):
  File "/home/xiao-sa/software/instrew/build/../subprojects/rellume/tests/test_parser.py", line 96, in <module>
    raise e
  File "/home/xiao-sa/software/instrew/build/../subprojects/rellume/tests/test_parser.py", line 90, in <module>
    case = parse_case(line, asm)
  File "/home/xiao-sa/software/instrew/build/../subprojects/rellume/tests/test_parser.py", line 56, in parse_case
    code, term = asm.assemble(val)
  File "/home/xiao-sa/software/instrew/build/../subprojects/rellume/tests/test_parser.py", line 25, in assemble
    res = bytes.fromhex(self.proc.stdout.readline().strip())
ValueError: non-hexadecimal number found in fromhex() arg at position 0

My personal PC is x86-64 system, does the error mean missing arm64 instruction? How should I solve this problem

aengelke commented 6 months ago

Which LLVM version? It works for me:

$ echo "!ASM smc #0" | ./subprojects/rellume/tests/test_assembler aarch64
030000d4
$ llvm-config --version
17.0.4
$ uname -m
x86_64
xiaoniaoyouhuajiang commented 6 months ago

Which LLVM version? It works for me:

$ echo "!ASM smc #0" | ./subprojects/rellume/tests/test_assembler aarch64
030000d4
$ llvm-config --version
17.0.4
$ uname -m
x86_64

My system configuration is as follows, do I need to change the llvm version or try something else

$ echo "!ASM smc #0" | ./subprojects/rellume/tests/test_assembler aarch64
bash: !ASM: event not found
$ llvm-config-14 --version
14.0.0
$ uname -m
x86_64
aengelke commented 6 months ago

I just did a test build with LLVM 14, it worked fine.

Re the first command I gave: use echo '!ASM smc #0' | ./subprojects/rellume/tests/test_assembler aarch64 (single quotes instead of double quotes), sorry about that.

xiaoniaoyouhuajiang commented 6 months ago

I just did a test build with LLVM 14, it worked fine.

Re the first command I gave: use echo '!ASM smc #0' | ./subprojects/rellume/tests/test_assembler aarch64 (single quotes instead of double quotes), sorry about that.

I tried this and recived "No such file", is test_assembler something i need to compiler for the subproject? It seems instrew depend on the subproject rellume,so I cloned rellume alone and try to build, but it remind me that I can't get the subproject named frvdec

orangecms commented 3 months ago

I just did a test build with LLVM 14, it worked fine. Re the first command I gave: use echo '!ASM smc #0' | ./subprojects/rellume/tests/test_assembler aarch64 (single quotes instead of double quotes), sorry about that.

I tried this and recived "No such file", is test_assembler something i need to compiler for the subproject? It seems instrew depend on the subproject rellume,so I cloned rellume alone and try to build, but it remind me that I can't get the subproject named frvdec

You need to clone the repo recursively, or otherwise add the submodules later. Look for help on "git submodules". :-)

aengelke commented 1 month ago

Closing as I still can't reproduce this.