From dcbb7df80d26b10204289a970ff89a77a53bd8df Mon Sep 17 00:00:00 2001 From: Glenn Anderson Date: Sat, 4 Jun 2022 23:33:19 -0700 Subject: [PATCH] Alignment adjustment to make XCVR perform the same as non-XCVR --- src/BlueSCSI.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/BlueSCSI.cpp b/src/BlueSCSI.cpp index 6d3ea4f..dfae9e6 100644 --- a/src/BlueSCSI.cpp +++ b/src/BlueSCSI.cpp @@ -1768,5 +1768,11 @@ BusFree: SCSI_TARGET_INACTIVE() // Turn off BSY, REQ, MSG, CD, IO output #ifdef XCVR TRANSCEIVER_IO_SET(vTR_TARGET,TR_INPUT); + // Something in code linked after this function is performing better with a +4 alignment. + // Adding this nop is causing the next function (_GLOBAL__sub_I_SD) to have an address with a last digit of 0x4. + // Last digit of 0xc also works. + // This affects both with and without XCVR, currently without XCVR doesn't need any padding. + // Until the culprit can be tracked down and fixed, it may be necessary to do manual adjustment. + asm("nop.w"); #endif }