* Emits operand data. */
| 1075 | * Emits operand data. |
| 1076 | */ |
| 1077 | static void sendOperandDataMetadata(FILE *out, const char *name, |
| 1078 | const InstrInfo *I, const OpInfo *op, int regno) |
| 1079 | { |
| 1080 | if (op == nullptr) |
| 1081 | return; |
| 1082 | |
| 1083 | switch (op->type) |
| 1084 | { |
| 1085 | case OPTYPE_IMM: |
| 1086 | fprintf(out, "\".Limm%d@%s\",", regno, name); |
| 1087 | switch (op->size) |
| 1088 | { |
| 1089 | case 1: |
| 1090 | fprintf(out, "{\"int8\":%d},", (int32_t)op->imm); |
| 1091 | break; |
| 1092 | case 2: |
| 1093 | fprintf(out, "{\"int16\":%d},", (uint32_t)op->imm); |
| 1094 | break; |
| 1095 | case 4: |
| 1096 | fprintf(out, "{\"int32\":%d},", (uint32_t)op->imm); |
| 1097 | break; |
| 1098 | default: |
| 1099 | fputs("{\"int64\":", out), |
| 1100 | sendInteger(out, op->imm); |
| 1101 | fputs("},", out); |
| 1102 | break; |
| 1103 | } |
| 1104 | break; |
| 1105 | |
| 1106 | default: |
| 1107 | return; |
| 1108 | } |
| 1109 | } |
| 1110 | |
| 1111 | /* |
| 1112 | * Emits instructions to translate to/from static and dynamic addresses. |
no test coverage detected