I'm disassembling a game which runs on an Intel i960 processor. My disassembly is at a point I would like to try to reassemble it from an IDA Pro generated ASM file. The ASM file needs slight manipulation for the binutils 2.16.1a i960-coff targeted assembler to work, however there seems to be an instruction, with similar instructions to follow but the assembler segfaults after this instruction, which cannot be reassembled.
The instruction is as follows: "stt r12, (g11)[g12]"
A git which shows the switch statement which defaults to the error can be found here. A colleague of mine explains that the error around the scale field is because the scale factor isn't 1, 2, 4, 8,or 16. The scale factor is only three bits, and he hypothesizes that this most likely is Register Indirect with Index form.
From a programming manual:
The st, stl, stt, and stq instructions copy 4, 8, 12, and 16 bytes from successive registers into memory. ... Floating-point values are loaded from memory into global or local registers using the load (ld), load long (ldl), and load triple (ldt) instructions. Likewise, floating-point values in global or local registers are stored in memory using the store (st), store long (stl), and store triple (stt) instructions. ... The st, stl, stt, and stq instructions copy 4, 8, 12, and 16 bytes, respectively, from successive registers to memory. For the stt instruction, src must specify an even numbered register (e.g., gO, g2, ... , gI2). For the stt and stq instructions, src must specify a register number that is a multiple of four (e.g., gO, g4, g8).
I, however, have a feeling that it might be a Register Indirect with index and displacement. The reason being is that the instruction can also be disassembled as ""stt r12, (g11)[g12*1]" and a manual lists a Register Indirect with index and displacement example in assembler syntax as:
exp (reg) [reg*scale]
But if that were the case, the scale would be 1. I am at somewhat of a loss and wish to pick the minds of the reverse engineering stack exchange to see what information may arise. It may be just that the game company had their own assembler and special knowledge on the processor that was not public or published.