2

In C assembly, the following code gives me the error when compiling,

output.s:5: Error: operand type mismatch for 'push'

output.s:6: Error: operand type mismatch for 'push'

.globl compute

compute:
pushq $9223372036854775807
pushq $9223372036854775807
popq  %r10
popq  %r11
imulq %r10, %r11
pushq %r11
popq  %rax
retq

And I think it's because the constants that are pushed are too large.

Community
  • 1
  • 1
hbd
  • 674
  • 7
  • 21

0 Answers0