[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Another minor arm assembler bug
From: |
Nick Clifton |
Subject: |
Re: Another minor arm assembler bug |
Date: |
Tue, 26 Jun 2001 18:31:39 GMT |
Hi Frank,
: [I apologize if this is a duplicate. I'm not sure if my original message
: went out or not.]
It did. I now have a patch to implement this (see below), but since I
am away from my main machine I have not yet checked it into the source
repository.
Cheers
Nick
2001-06-26 Nick Clifton <address@hidden>
* config/tc-arm.c (do_ldst): Use MVN to build simple negative
constants.
*** tc-arm.c.orig Tue Jun 26 11:35:43 2001
--- tc-arm.c Tue Jun 26 11:35:46 2001
*************** do_ldst (str, flags)
*** 4611,4616 ****
--- 4611,4626 ----
end_of_line (str);
return;
}
+ else if (inst.reloc.exp.X_op == O_constant
+ && (value = validate_immediate (- inst.reloc.exp.X_add_number)) !=
FAIL)
+ {
+ /* This can be done with a mvn instruction. */
+ inst.instruction &= LITERAL_MASK;
+ inst.instruction |= INST_IMMEDIATE | (OPCODE_MVN << DATA_OP_SHIFT);
+ inst.instruction |= (flags & COND_MASK) | (value & 0xfff);
+ end_of_line (str);
+ return;
+ }
else
{
/* Insert into literal pool. */