Tejas Belagod wrote:
Marcus Shawcroft wrote:
On 13/06/12 14:38, Sofiane Naci wrote:
Hi,

I discovered a bug in my previous patch, so I attach a new one.
The ChangeLog hasn't changed.
OK to commit?

Thanks
Sofiane

-----Original Message-----
From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches-ow...@gcc.gnu.org]
On
Behalf Of Sofiane Naci
Sent: 31 May 2012 10:55
To: gcc-patches@gcc.gnu.org
Subject: [PATCH, GCC][AArch64] Use Enums for code models option selection

Hi,

This patch re-factors code models option selection in the AArch64 port:

  . Renaming variables such as mem_model to cmodel, for better clarity.
  . Using the generic support for enumerated option arguments.
  . Fixing touched code layout and formatting issues.

Thanks
Sofiane

-----

ChangeLog:

2012-05-31  Sofiane Naci<sofiane.n...@arm.com>

        [AArch64] Use Enums for code models option selection.

        * config/aarch64/aarch64-elf-raw.h (AARCH64_DEFAULT_MEM_MODEL):
Delete.
        * config/aarch64/aarch64-linux.h (AARCH64_DEFAULT_MEM_MODEL):
Delete.
        * config/aarch64/aarch64-opts.h (enum aarch64_code_model): New.
        * config/aarch64/aarch64-protos.h: Update comments.
        * config/aarch64/aarch64.c: Update comments.
        (aarch64_default_mem_model): Rename to aarch64_code_model.
        (aarch64_expand_mov_immediate): Remove error message.
        (aarch64_select_rtx_section): Remove assertion and update comment.
        (aarch64_override_options): Move memory model initialization from
here.
        (struct aarch64_mem_model): Delete.
        (aarch64_memory_models[]): Delete.
        (initialize_aarch64_memory_model): Rename to
initialize_aarch64_code_model
        and update.
        (aarch64_classify_symbol): Handle AARCH64_CMODEL_TINY and
        AARCH64_CMODEL_TINY_PIC
        * config/aarch64/aarch64.h
        (enum aarch64_memory_model): Delete.
        (aarch64_default_mem_model): Rename to aarch64_cmodel.
        (HAS_LONG_COND_BRANCH): Update.
        (HAS_LONG_UNCOND_BRANCH): Update.
        * config/aarch64/aarch64.opt
        (cmodel): New.
        (mcmodel): Update.
OK



I've checked this in on aarch64-branch upstream for Sofiane.

Tejas.

Sorry, I broke the build when I applied this patch. Attached is a patch that fixes this. Build and regressions are happy. OK to commit?

Thanks,
Tejas Belagod.
ARM.

Changelog

2012-06-28  Tejas Belagod  <tejas.bela...@arm.com>

gcc/
        * config/aarch64/aarch64.h (aarch64_cmodel): Fix enum name.
diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index ce2f899..5e24cd7 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -802,7 +802,7 @@ enum aarch64_builtins
 /* Check TLS Descriptors mechanism is selected.  */
 #define TARGET_TLS_DESC (aarch64_tls_dialect == TLS_DESCRIPTORS)
 
-extern enum aarch64_memory_model aarch64_cmodel;
+extern enum aarch64_code_model aarch64_cmodel;
 
 /* When using the tiny addressing model conditional and unconditional branches
    can span the whole of the available address space (1MB).  */

Reply via email to