+ // 6502 words are little endian, so handle that here
+ if (sno == M6502)
+ SETLE16(locp, 0, eval)
+ else
+ SETBE16(locp, 0, eval)
+
+ break;
+
+ // Fixup LONG forward references; the long could be unaligned in the
+ // section buffer, so be careful (again).
+ case FU_LONG:
+ flags = MLONG;
+
+ if ((dw & FUMASKRISC) == FU_MOVEI)
+ {
+ // Long constant in MOVEI # is word-swapped, so fix it here
+ eval = WORDSWAP32(eval);
+ flags |= MMOVEI;
+ }
+
+ // If the symbol is undefined, make sure to pass the symbol in
+ // to the MarkRelocatable() function.
+ if (!(eattr & DEFINED))
+ MarkRelocatable(sno, loc, 0, flags, esym);
+ else if (tdb)
+ MarkRelocatable(sno, loc, tdb, flags, NULL);
+
+ SETBE32(locp, 0, eval);
+ break;
+
+ // Fixup QUAD forward references (mainly used by the OP assembler)
+ case FU_QUAD:
+ if (dw & FU_OBJLINK)
+ {
+ uint64_t quad = GETBE64(locp, 0);
+ uint64_t addr = eval;
+
+//Hmm, not sure how this can be set, since it's only set if it's a DSP56001 fixup or a FU_JR... :-/
+// if (fup->orgaddr)
+// addr = fup->orgaddr;
+
+ eval = (quad & 0xFFFFFC0000FFFFFFLL) | ((addr & 0x3FFFF8) << 21);
+ }
+ else if (dw & FU_OBJDATA)
+ {
+ // If it's in a TEXT or DATA section, be sure to mark for a
+ // fixup later
+ if (tdb)
+ MarkRelocatable(sno, loc, tdb, MQUAD, NULL);
+
+ uint64_t quad = GETBE64(locp, 0);
+ uint64_t addr = eval;
+
+//Hmm, not sure how this can be set, since it's only set if it's a DSP56001 fixup or a FU_JR... :-/
+// if (fup->orgaddr)
+// addr = fup->orgaddr;
+
+ eval = (quad & 0x000007FFFFFFFFFFLL) | ((addr & 0xFFFFF8) << 40);
+ }
+
+ SETBE64(locp, 0, eval);
+ break;
+
+ // Fixup a 3-bit "QUICK" reference in bits 9..1
+ // (range of 1..8) in a word. [Really bits 1..3 in a byte.]
+ case FU_QUICK:
+ if (!(eattr & DEFINED))
+ {
+ error("External quick reference");
+ continue;
+ }