Thanks Marc,
I'll fix it.
Erick
Le 11-03-22 11:13 , Marc Feeley a écrit :
On 2011-03-21, at 5:31 PM, chevalma@iro.umontreal.ca wrote:
Once the 64 bit bugs are fixed, we will work on compiling the standard library. With some luck, we might be able to run the shell pretty soon.
I think I have located the error. It is in the x86_64 encoding of the move with sign-extension instruction (which is used to convert a C string to a JS string). The code generated for the function cStringToBox contains:
00013c 48 0f be 3c 1e movsxbq (%rsi + %rbx),%rdi 000141 66 0f be ff movsxbw %dil,%di
The second x86_64 instruction, which is generated for the LIR instruction "u16 ch_2 = icast_u16 cCh_2;", should be encoded as:
000141 66 40 0f be ff movsxbw %dil,%di
If the "40" is not there I believe it encodes the instruction "movsxbw %bh,%di", and probably bh contains 0, which explains the error during scanning (unknown token: 0).
Erick can you fix it?
Side note, the instruction mnemonic should not contain the "x". Also the operand (%rsi + %rbx) should be printed as (%rsi, %rbx). That way the listing generated is compatible with the GNU assembler (making it easier to cut and paste, and compare code, from other GNU tools).
Marc
Tachyon-list mailing list Tachyon-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/tachyon-list