MCPcopy Create free account
hub / github.com/WheretIB/nullc / GenCodeCmdConvertPtr

Function GenCodeCmdConvertPtr

NULLC/CodeGen_X86.cpp:3195–3214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3193}
3194
3195void GenCodeCmdConvertPtr(VMCmd cmd)
3196{
3197 EMIT_COMMENT("CONVERTPTR");
3198
3199 EMIT_OP_REG(o_pop, rEAX);
3200 EMIT_OP_REG_NUM(o_cmp, rEAX, cmd.argument);
3201 EMIT_OP_LABEL(o_je, aluLabels);
3202#ifdef __linux
3203 EMIT_OP_ADDR_REG(o_mov, sDWORD, paramBase-16, rEAX);
3204 // call siglongjmp(target_env, EXCEPTION_CONVERSION_ERROR);
3205 EMIT_OP_NUM(o_push, EXCEPTION_CONVERSION_ERROR | (cmd.argument << 8));
3206 EMIT_OP_NUM(o_push, nullcJmpTarget);
3207 EMIT_OP_RPTR(o_call, sDWORD, rNONE, 1, rNONE, (unsigned)(intptr_t)&siglongjmpPtr);
3208#else
3209 EMIT_OP_REG_NUM(o_mov, rECX, cmd.argument);
3210 EMIT_OP_NUM(o_int, 3);
3211#endif
3212 EMIT_LABEL(aluLabels);
3213 aluLabels++;
3214}
3215
3216ExternTypeInfo* (*getTypeListFunc)() = GetTypeList;
3217

Callers

nothing calls this directly

Calls 8

EMIT_COMMENTFunction · 0.85
EMIT_OP_REGFunction · 0.85
EMIT_OP_REG_NUMFunction · 0.85
EMIT_OP_LABELFunction · 0.85
EMIT_OP_ADDR_REGFunction · 0.85
EMIT_OP_NUMFunction · 0.85
EMIT_OP_RPTRFunction · 0.85
EMIT_LABELFunction · 0.85

Tested by

no test coverage detected