This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch ARM] Switch to unified asm for ARM state in the compiler.


Hi Ramana,

On 07/15/2015 06:52 PM, Ramana Radhakrishnan wrote:
Hi,

This patch switches A32 (ARM) state code generation to unified syntax. The backend already generates unified syntax in Thumb state and for the floating point / SIMD instruction set. The backend still continues to use divided syntax for inline assembler.

This is beneficial for a few reasons.

1. Assembler output from the compiler is more in line with the documentation for the ISA.
2. Removing special casing for various instructions where unified asm went one way and divided asm the other.
3. Possible sharing of more patterns between arm.md and thumb2.md - I've not addressed that in this patch though.
4. Frees up a few punctuation characters if we ever needed them.

This patch does the following - (some minor follow-ups are required)

- Remove use of TARGET_UNIFIED_ASM
- Consolidate all uses into unified asm and removes all old support for the same.
- Remove support for %( and %) punctuation characters. I do not expect these characters to be used in inline assembler.
- Remove all use of %. punctuation character - however definition remains as an oversight. I will deal with this in a followup patch.
- Need to cleanup the definition of ARM_LSL_NAME and remove that in a future patch.
- Adjust testsuite.



Tested with bootstrap and regression run on armhf with and without thumb on Cortex-A15.


arm-none-eabi with the following multilibs.

                            "arm-eabi{-marm/-march=armv7-a/-mfpu=vfpv3-d16/-mfloat-abi=softfp}" \
                            "arm-eabi{-mthumb/-march=armv8-a/-mfpu=crypto-neon-fp-armv8/-mfloat-abi=hard}" \
                            "arm-eabi{-marm/-mcpu=arm7tdmi/-mfloat-abi=soft}" \
                            "arm-eabi{-mthumb/-mcpu=arm7tdmi/-mfloat-abi=soft}

with no regressions.


I will apply this to trunk in a couple of days if folks don't have any comments and try out a few more multilibs in order to stress this a bit.

I tried your patch with arm-sim/\{,-mthumb}{,-march=armv7-a\} and stressed with -mflip-thumb :

Only one new failure (just missing scan update ldmfd -> push):

PASS: gcc.target/arm/mmx-1.c scan-assembler ldmfd[ \t]sp!.*ip,[ ]*pc
FAIL: gcc.target/arm/mmx-1.c scan-assembler ldmfd[ \t]sp!.*ip,[ ]*pc

To note: one new SUCCESS that FAILED with -mflip-thumb :
PASS: gcc.target/arm/thumb-16bit-ops.c scan-assembler lsl\tr0, r1, r2

Cheers

Christian



regards
Ramana

<DATE>  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

         * config/arm/arm-ldmstm.ml: Rewrite to using unified syntax.
         * config/arm/ldmstm.md: Regenerate.
         * config/arm/arm.c (arm_asm_trampoline_template): Use unified syntax.
         (arm_output_multireg_pop): Use unified syntax.
         (output_move_double): Likewise.
         (output_move_quad): Likewise.
         (output_return_instruction): Likewise
         (arm_print_operand): Remove support for '(' and ')'
         (arm_output_shift):  Use unified syntax.
         (arm_declare_function_name): Likewise.
         * config/arm/arm.h (TARGET_UNIFIED_SYNTAX): Delete.
         * config/arm/arm.md: Rewrite to generate unified syntax.
         * config/arm/sync.md: Likewise.
         * config/arm/thumb2.md: Likewise.

gcc/testsuite

<DATE>  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

         * gcc.target/arm/combine-movs.c: Adjust.
         * gcc.target/arm/interrupt-1.c: Likewise.
         * gcc.target/arm/interrupt-2.c: Likewise.
         * gcc.target/arm/unaligned-memcpy-4.c: Likewise.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]