diff options
| -rw-r--r-- | src/comp.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/comp.c b/src/comp.c index dadd5255b72..a87f59be3d8 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -2664,11 +2664,12 @@ push_float_block (void) | |||
| 2664 | char *name | 2664 | char *name |
| 2665 | = format_string ("float_block_%ld", | 2665 | = format_string ("float_block_%ld", |
| 2666 | XFIXNUM (Flength (comp.float_block_list))); | 2666 | XFIXNUM (Flength (comp.float_block_list))); |
| 2667 | gcc_jit_type *float_block_type | ||
| 2668 | = gcc_jit_type_get_const (comp.float_block_aligned_type); | ||
| 2667 | gcc_jit_lvalue *var | 2669 | gcc_jit_lvalue *var |
| 2668 | = gcc_jit_context_new_global (comp.ctxt, NULL, | 2670 | = gcc_jit_context_new_global (comp.ctxt, NULL, |
| 2669 | GCC_JIT_GLOBAL_INTERNAL, | 2671 | GCC_JIT_GLOBAL_INTERNAL, |
| 2670 | comp.float_block_aligned_type, | 2672 | float_block_type, name); |
| 2671 | name); | ||
| 2672 | Lisp_Object entry | 2673 | Lisp_Object entry |
| 2673 | = CALLN (Fvector, make_mint_ptr (var), make_fixnum (-1), | 2674 | = CALLN (Fvector, make_mint_ptr (var), make_fixnum (-1), |
| 2674 | Fmake_vector (make_fixnum (float_block_floats_length), | 2675 | Fmake_vector (make_fixnum (float_block_floats_length), |
| @@ -2891,12 +2892,17 @@ float_block_new_float (gcc_jit_rvalue *init_val) | |||
| 2891 | alloc_block_set_last_idx (block, idx); | 2892 | alloc_block_set_last_idx (block, idx); |
| 2892 | alloc_block_put_cons (block, init_val, idx); | 2893 | alloc_block_put_cons (block, init_val, idx); |
| 2893 | 2894 | ||
| 2894 | gcc_jit_lvalue *var = alloc_block_var (block); | 2895 | gcc_jit_rvalue *block_rval = gcc_jit_lvalue_as_rvalue (alloc_block_var (block)); |
| 2895 | gcc_jit_lvalue *floats | 2896 | block_rval |
| 2896 | = gcc_jit_lvalue_access_field (var, NULL, | 2897 | = gcc_jit_context_new_bitcast (comp.ctxt, NULL, block_rval, |
| 2898 | gcc_jit_type_unqualified ( | ||
| 2899 | gcc_jit_rvalue_get_type ( | ||
| 2900 | block_rval))); | ||
| 2901 | gcc_jit_rvalue *floats | ||
| 2902 | = gcc_jit_rvalue_access_field (block_rval, NULL, | ||
| 2897 | comp.float_block_floats); | 2903 | comp.float_block_floats); |
| 2898 | return gcc_jit_context_new_array_access ( | 2904 | return gcc_jit_context_new_array_access ( |
| 2899 | comp.ctxt, NULL, gcc_jit_lvalue_as_rvalue (floats), | 2905 | comp.ctxt, NULL, floats, |
| 2900 | gcc_jit_context_new_rvalue_from_int (comp.ctxt, comp.ptrdiff_type, | 2906 | gcc_jit_context_new_rvalue_from_int (comp.ctxt, comp.ptrdiff_type, |
| 2901 | idx)); | 2907 | idx)); |
| 2902 | } | 2908 | } |