+
+ aopOp (IC_RESULT(ic),TRUE);
+
+ if (isOperandOnStack(left)) {
+ aopOp (IC_LEFT(ic),FALSE);
+ emitcode ("lea", "%s,%s", AOP_NAME(IC_RESULT(ic))[0],
+ AOP_NAME(IC_LEFT(ic))[0]);
+ if (AOP_SIZE(IC_RESULT(ic)) > 2) {
+ // this must be a generic pointer
+ emitcode ("mov", "%s,#0x01", AOP_NAME(IC_RESULT(ic))[1]);
+ }
+ return;
+ }
+
+ if (isOperandInDirSpace(left) ||
+ isOperandInFarSpace(left) ||
+ isOperandInCodeSpace(left)) {
+ emitcode ("mov", "%s,#%s", AOP_NAME(IC_RESULT(ic))[0],
+ OP_SYMBOL(left));
+ if (AOP_SIZE(IC_RESULT(ic)) > 2) {
+ // this must be a generic pointer
+ int space=0; // dir space
+ if (isOperandInFarSpace(left)) {
+ space=1;
+ } else if (isOperandInCodeSpace(left)) {
+ space=2;
+ }
+ emitcode ("mov", "%s,#0x%02x", AOP_NAME(IC_RESULT(ic))[1], space);
+ }
+ return;
+ }
+
+ bailOut("genAddrOf");