Closed icyfox168168 closed 2 years ago
-dhalf-assemble
is still work in progress, and should not really be used. Its purpose is to allow me to more easily implement the assembler. It works by replacing some instructions with the corresponding byte-code. For example movl -28(%rbp), %edi
is replaced with .byte 0x8b, 0x7d, 0xe4
.
In which way does it not give the correct results? On my system all tests pass with it activated.
Different results are obtained in an MD5 algorithm
test. C file I send you email
char decrypt[16] ={0};
printf("gg %02x %d \n",decrypt[0],str_len1("88"));
MD5_CTX md5;
MD5Init(&md5);
MD5Update(&md5, "88", str_len1("88"));
MD5Final(&md5, decrypt);
printf("ff %02x %d \n",decrypt[0],str_len1("88"));
cc.exe test.c -fabi=ms -fdebug-stack-size=0 -fcmodel=large -D test.s -IC:\Users\fix\Desktop\C-Compiler-Test\include gg 00 2 ff 2a 2 ret 24
cc.exe test.c -dhalf-assemble -fabi=ms -fdebug-stack-size=0 -fcmodel=large -D test0.s -IC:\Users\fix\Desktop\C-Compiler-Test\include gg 00 2 ff ffffff90 2 ret 23
The latest version solves the problem
gg 00 2 ff 2a 2 ret 24
Internal compiler error on line 171 file src/assembler/assembler.c of compiler source: "Could not assemble cmpl"
compiler bddisasm
I'm not able to reproduce that bug. bddisasm with the example provided in their README.md compiles on my system. In which source file does the error occur?
I have found the error. It should work with the latest master
bddisasm\bdshemu\bdshemu.c
bddisasm\bdshemu\bdshemu.c -dhalf-assemble -fabi=ms -fdebug-stack-size=20480 -fcmodel=large -D bdshemu.s -fmingw-workarounds
Internal compiler error on line 180 file src/assembler/assembler.c of compiler source: "Could not assemble cmpl"
Without -dhalf-assemble everything works fine
It should be fixed now.
ok
Internal compiler error on line 161 file src/assembler/assembler.c of compiler source: "Could not assemble testw 1 1 0 0"
Encoding for testw
was added in latest commit. Since -dhalf-assemble
no longer exists, I will close this issue.
-dhalf-assemble -fabi=ms -fdebug-stack-size=0 -fcmodel=large
If this parameter is added, the test examples that get the correct results in the previous compilation cannot get the correct results Has the work behind this parameter been completed?