On 12/7/18 6:48 PM, Alistair Francis wrote:
> +    /* Compare masked address with the TLB entry. */
> +    label_ptr[0] = s->code_ptr;
> +    tcg_out_opc_branch(s, OPC_BNE, TCG_REG_TMP0, TCG_REG_TMP1, 0);
> +    /* TODO: Move this out of line

Until you do move this out of line, you need to add the nop that you use for
normal branches...


> +    /* resolve label address */
> +    reloc_sbimm12(l->label_ptr[0], s->code_ptr);

... and use patch_reloc(..., R_RISCV_BRANCH, ...).
Or split that out to its own function too.

Otherwise this branch is going to be out of range at some point.


r~

Reply via email to