diff options
author | Edward Hervey <bilboed@bilboed.com> | 2010-09-20 16:18:07 +0200 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2010-09-20 16:21:30 +0200 |
commit | 9814ae3dd35edf6504249e4ed0cb802cce4cb456 (patch) | |
tree | 693ae8a1c66aa0c1627efc6268cb4da5b65362e2 | |
parent | c5938e91837758b6c9edec101bb43cb0356484f7 (diff) |
in C_NOEXEC, if the argument is a float we need to store it as
a float.
-rw-r--r-- | orc/orcprogram-c.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/orc/orcprogram-c.c b/orc/orcprogram-c.c index d41dc82..7c49ab4 100644 --- a/orc/orcprogram-c.c +++ b/orc/orcprogram-c.c @@ -756,7 +756,11 @@ c_rule_loadpX (OrcCompiler *p, void *user, OrcInstruction *insn) char dest[40]; int size = ORC_PTR_TO_INT(user); - c_get_name_int (dest, p, insn, insn->dest_args[0]); + if ((p->target_flags & ORC_TARGET_C_NOEXEC) && + (p->vars[insn->src_args[0]].param_type == ORC_PARAM_TYPE_FLOAT)) + c_get_name_float (dest, p, insn, insn->dest_args[0]); + else + c_get_name_int (dest, p, insn, insn->dest_args[0]); if (p->vars[insn->src_args[0]].vartype == ORC_VAR_TYPE_PARAM) { if (p->target_flags & ORC_TARGET_C_NOEXEC) { |