1

I'm trying to compile a BSP program written in C, and I'm getting this weird error message:

/tmp/ccEDn8lx.s: Assembler messages:
/tmp/ccEDn8lx.s:141: Error: illegal immediate register operand (%rip)

Code: http://pastebin.com/cuz026ji

Does anyone know what would cause this?

Alexey Frunze
  • 61,140
  • 12
  • 83
  • 180
Shmoopy
  • 5,334
  • 4
  • 36
  • 72

1 Answers1

2

I had this error pop up when I tried to compile on a remote unix server as well. My cpp file would compile elsewhere, but on the remote unix serve it would spit out the same error message: illegal immediate register operand (%rip). It turns out that I was trying to use a character that wasn't allowed. That is, I had "$" as a variable, once I replaced this it would compile.