I've submitted a support request to IAR asking about this, but I though I would describe my problem, maybe someone will have an idea, or it might be a useful heads-up if someone else encounters the problem.
My CC2530 project was getting close to the 32K limit so I switched to a banked code mode, using the banked linker file.
I had a debug LED on port 1 bit 4 and noticed that it was coming on when I made ANY call to banked code.
In the debugger, I stepped through the disassembly view and I was astonished to find that one of the function used to relay calls from root code to banked functions, named ?BDISPATCH_30 was messing with port 1!
I could probably work around this if I could force library functions like memcpy to link into the root bank, and only put code in the switched bank that I can tolerate having port 1 messed up, but I can't figure out how to do that.
?BDISPATCH_30 goes something like this:
MOV A,P1
SWAP A
ANL A, #30
.....
MOV P1, A
RET
At this point my debug LED turns on, it was off going into this function.