diff options
author | Roger Sayle <roger@eyesopen.com> | 2006-04-13 21:31:00 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2006-04-13 21:31:00 +0000 |
commit | 15b1c12a01b2099bc5f997133dccce5e51673fe3 (patch) | |
tree | e2d11eb6c22809d739fb2a75669b737367ecaf98 /gcc | |
parent | 78bf6e2fc41516377353a272967b1c2d4f655e19 (diff) | |
download | gcc-15b1c12a01b2099bc5f997133dccce5e51673fe3.zip gcc-15b1c12a01b2099bc5f997133dccce5e51673fe3.tar.gz gcc-15b1c12a01b2099bc5f997133dccce5e51673fe3.tar.bz2 |
fold-const.c (native_encode_vector, [...]): Correct obvious mistakes in the previous check-in.
* fold-const.c (native_encode_vector, native_interpret_real):
Correct obvious mistakes in the previous check-in.
From-SVN: r112930
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fold-const.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 708551d..b18bb7e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2006-04-13 Roger Sayle <roger@eyesopen.com> + * fold-const.c (native_encode_vector, native_interpret_real): + Correct obvious mistakes in the previous check-in. + +2006-04-13 Roger Sayle <roger@eyesopen.com> + * fold-const.c (native_encode_expr): New function to encode the target representation of an INTEGER_CST, REAL_CST, COMPLEX_CST or VECTOR_CST into a specified buffer. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 8c88cd3..3a8327b 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -6882,8 +6882,7 @@ native_encode_complex (tree expr, unsigned char *ptr, int len) static int native_encode_vector (tree expr, unsigned char *ptr, int len) { - tree type = TREE_TYPE (expr); - int i, size, offste, count; + int i, size, offset, count; tree elem, elements; size = 0; @@ -7004,7 +7003,8 @@ native_interpret_int (tree type, unsigned char *ptr, int len) static tree native_interpret_real (tree type, unsigned char *ptr, int len) { - int total_bytes = GET_MODE_SIZE (TYPE_MODE (type)); + enum machine_mode mode = TYPE_MODE (type); + int total_bytes = GET_MODE_SIZE (mode); int byte, offset, word, words; unsigned char value; /* There are always 32 bits in each long, no matter the size of |