[llvm-commits] [llvm-gcc-4.2] r81342 - /llvm-gcc-4.2/trunk/gcc/config/i386/i386.h
Bill Wendling
wendling at apple.com
Wed Sep 9 11:03:03 PDT 2009
On Sep 9, 2009, at 7:21 AM, Anton Korobeynikov wrote:
> Author: asl
> Date: Wed Sep 9 09:21:16 2009
> New Revision: 81342
>
> URL: http://llvm.org/viewvc/llvm-project?rev=81342&view=rev
> Log:
> Propagate code model setting
>
> Modified:
> llvm-gcc-4.2/trunk/gcc/config/i386/i386.h
>
> Modified: llvm-gcc-4.2/trunk/gcc/config/i386/i386.h
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/i386.h?rev=81342&r1=81341&r2=81342&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm-gcc-4.2/trunk/gcc/config/i386/i386.h (original)
> +++ llvm-gcc-4.2/trunk/gcc/config/i386/i386.h Wed Sep 9 09:21:16 2009
> @@ -3928,6 +3928,27 @@
> distinguish them. */
> #define LLVM_DO_NOT_USE_REG_NAMES
>
> +/* Propagate code model setting to backend */
> +#define LLVM_SET_MACHINE_OPTIONS(argvec) \
> + switch (ix86_cmodel) { \
> + case CM_SMALL: \
> + case CM_SMALL_PIC: \
> + argvec.push_back("--code-model=small"); \
> + break; \
> + case CM_KERNEL: \
> + argvec.push_back("--code-model=kernel"); \
> + break; \
> + case CM_MEDIUM: \
> + case CM_MEDIUM_PIC: \
> + argvec.push_back("--code-model=medium"); \
> + break; \
> + case CM_32: \
> + argvec.push_back("--code-model=default"); \
> + break; \
> + default: \
> + sorry ("code model %<%s%> not supported yet",
> ix86_cmodel_string); \
Could you put the "default" case first in the switch? I think the
compiler gets fussy about it falling off the end and warns.
-bw
> + }
> +
> #endif /* ENABLE_LLVM */
> /* LLVM LOCAL end */
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list