We are currently working on the direct object emitter for the Mips compiler. When we need to emit a branch instruction to a forward label, how is that done? In an assembler this would normally be done in a second pass. TIA. Reed
On Thu, Oct 6, 2011 at 6:33 PM, reed kotler <rkotler at mips.com> wrote:> We are currently working on the direct object emitter for the Mips compiler. > > When we need to emit a branch instruction to a forward label, how is > that done? > > In an assembler this would normally be done in a second pass.It's done that way in MC as well; expressions which can't be resolved immediately are recorded using MCFixup, and either resolved or recorded into the object file later. -Eli