jacobly0 / llvm-project

This fork of the canonical git mirror of the LLVM subversion repository adds (e)Z80 targets. Please refer to the wiki for important build instructions.
https://github.com/jacobly0/llvm-project/wiki
123 stars 15 forks source link

48-bit bitwise not emits `__snot` instead of `__i48not` #48

Open runer112 opened 2 weeks ago

runer112 commented 2 weeks ago

Demonstration: https://discord.com/channels/432891584451706892/1184990251769397380/1305595574246182952

Compiling c -std=gnu11 in -Oz for ez80:

int48_t foo(int48_t x) { return ~x; }
public    _foo
_foo:
  call    __frameset0
  ld  hl, (ix + 6)
  ld  de, (ix + 9)
  call    __snot
  pop ix
  ret

  extern  __snot
  extern  __frameset0