Implement 16-bit microMIPS add immediate unsigned word to stack pointer - ADDIUSP.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
For this instruction there seems to be a difference between microMIPS reference and GAS, regarding the decoded value of a offset. microMIPS reference says that allowable values for a offset are [2, 3, ..., 256, 257] and [-3, -4, ..., -257, -258], and this value is shifted by 2 to give final stack offset. GAS allows only shifted (final) values: [8, 12, ... , 1024, 1028] and [-12, -16, ... , -1028, -1032]. I suggest to follow GAS approach, because .s file is much easier to read if final offset is used. Of course, encoded values are identical.
Comment Actions
LGTM, with a change of variable name to uppercase.
lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp | ||
---|---|---|
373 | Variable name should start with uppercase. |