Add a negation instruction

Necessary for floating-point negation, because
`%result = sub 0, %operand` doesn't give the correct sign for 0/-0.
This commit is contained in:
Eyal Sawady 2022-01-17 22:00:48 +00:00 committed by Quentin Carbonneaux
parent 367c8215d9
commit e91d121581
8 changed files with 28 additions and 13 deletions

View file

@ -43,6 +43,8 @@ static struct {
{ Oadd, Ka, "fadd %=, %0, %1" },
{ Osub, Ki, "sub %=, %0, %1" },
{ Osub, Ka, "fsub %=, %0, %1" },
{ Oneg, Ki, "neg %=, %0" },
{ Oneg, Ka, "fneg %=, %0" },
{ Oand, Ki, "and %=, %0, %1" },
{ Oor, Ki, "orr %=, %0, %1" },
{ Oxor, Ki, "eor %=, %0, %1" },