diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-01 05:50:51 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-01 05:50:51 +0000 |
commit | e49e8bd540832217538f9720f502da8c20f1f9b0 (patch) | |
tree | 8f6bc6f898cfafd809ea3bf6f2a7660a896f9a40 /gcc/emit-rtl.c | |
parent | b528597c9f3f2e3a64a664c7be6c82a7c2688287 (diff) | |
download | gcc-e49e8bd540832217538f9720f502da8c20f1f9b0.tar.gz |
2008-07-01 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r137307
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@137309 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index fa2b78a4d95..418da241b66 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -349,7 +349,7 @@ get_mem_attrs (alias_set_type alias, tree expr, rtx offset, rtx size, memcpy (*slot, &attrs, sizeof (mem_attrs)); } - return *slot; + return (mem_attrs *) *slot; } /* Returns a hash code for X (which is a really a reg_attrs *). */ @@ -398,7 +398,7 @@ get_reg_attrs (tree decl, int offset) memcpy (*slot, &attrs, sizeof (reg_attrs)); } - return *slot; + return (reg_attrs *) *slot; } @@ -812,7 +812,7 @@ gen_rtvec (int n, ...) if (n == 0) return NULL_RTVEC; /* Don't allocate an empty rtvec... */ - vector = alloca (n * sizeof (rtx)); + vector = XALLOCAVEC (rtx, n); for (i = 0; i < n; i++) vector[i] = va_arg (p, rtx); @@ -893,12 +893,11 @@ gen_reg_rtx (enum machine_mode mode) char *new; rtx *new1; - new = xrealloc (crtl->emit.regno_pointer_align, old_size * 2); + new = XRESIZEVEC (char, crtl->emit.regno_pointer_align, old_size * 2); memset (new + old_size, 0, old_size); crtl->emit.regno_pointer_align = (unsigned char *) new; - new1 = ggc_realloc (regno_reg_rtx, - old_size * 2 * sizeof (rtx)); + new1 = GGC_RESIZEVEC (rtx, regno_reg_rtx, old_size * 2); memset (new1 + old_size, 0, old_size * sizeof (rtx)); regno_reg_rtx = new1; @@ -3102,7 +3101,7 @@ static int find_auto_inc (rtx *xp, void *data) { rtx x = *xp; - rtx reg = data; + rtx reg = (rtx) data; if (GET_RTX_CLASS (GET_CODE (x)) != RTX_AUTOINC) return 0; @@ -4741,7 +4740,7 @@ start_sequence (void) free_sequence_stack = tem->next; } else - tem = ggc_alloc (sizeof (struct sequence_stack)); + tem = GGC_NEW (struct sequence_stack); tem->next = seq_stack; tem->first = first_insn; @@ -5047,11 +5046,10 @@ init_emit (void) crtl->emit.regno_pointer_align_length = LAST_VIRTUAL_REGISTER + 101; crtl->emit.regno_pointer_align - = xcalloc (crtl->emit.regno_pointer_align_length - * sizeof (unsigned char), 1); + = XCNEWVEC (unsigned char, crtl->emit.regno_pointer_align_length); regno_reg_rtx - = ggc_alloc (crtl->emit.regno_pointer_align_length * sizeof (rtx)); + = GGC_NEWVEC (rtx, crtl->emit.regno_pointer_align_length); /* Put copies of all the hard registers into regno_reg_rtx. */ memcpy (regno_reg_rtx, |