- fprintf (oFile, "\t.byte %s,%s,#0x%d\n",
- aopLiteral (val, 0), aopLiteral (val, 1), GPTYPE_CODE);
+ fprintf (oFile, "; generic printIvalPtr\n");
+ if (port->little_endian)
+ {
+ fprintf (oFile, "\t.byte %s,%s",
+ aopLiteral (val, 0), aopLiteral (val, 1));
+ }
+ else
+ {
+ fprintf (oFile, "\t.byte %s,%s",
+ aopLiteral (val, 1), aopLiteral (val, 0));
+ }
+ if (IS_GENPTR (val->type))
+ fprintf (oFile, ",%s\n", aopLiteral (val, 2));
+ else if (IS_PTR (val->type))
+ fprintf (oFile, ",#%x\n", pointerTypeToGPByte (DCL_TYPE (val->type), NULL, NULL));
+ else
+ fprintf (oFile, ",%s\n", aopLiteral (val, 2));