DoctorWkt / acwj

A Compiler Writing Journey
GNU General Public License v3.0
10.43k stars 1.01k forks source link

[BUG]: Test failed from 13 to 20 #72

Open albertethon opened 8 months ago

albertethon commented 8 months ago

Test failed from 13-20.

The error message is incorrect register %r8' used with l' suffix

It seems that movzbl can only use 32-bit registers?

int cgloadglob(int id) {
//...
    case P_INT:
      fprintf(Outfile, "\tmovzbl\t%s(\%%rip), %s\n", Gsym[id].name,
          reglist[r]);
//...

should reglist[r] be changed to dreglist[r] ? The test passed when I made this change