On 10/08/16 14:28, Thomas Preudhomme wrote: > Hi, > > Mappings (MULTILIB_MATCHES and MULTILIB_REUSE) in ARM aprofile multilib > suffer from a number of issues: > > * missing mapping of -mcpu=cortex-a7 to -march=armv7-a
You mean -march=armv7ve... > * typo on vfpv3-d16-fp16 (MULTILIB_MATCHES uses vfpv3-fp16-d16 instead) > * missing mapping for neon-fp16, fpv5-d16 and fp-armv8 to neon, vfpv4 and > vfpv4 respectively > * reuse directive with option not in MULTILIB_OPTION (-mfpu=vfpv4 and > -mfpu=fp-armv8) > > The latter leads to unexpected results currently: GCC creates a reuse mapping > that match for any -mfpu not in MULTILIB_OPTIONS. This means for instance > that -march=armv7-a -mfpu=vfp -mfloat-abi=hard is mapped to -march=armv7-a > -mfpu=vfpv3-d16 -mfloat-abi=hard. With this patch, it is now mapped to the > default multilib (ie. -print-multi-directory gives .) which is a softfloat > multilib. Arguably an option not in MULTILIB_OPTIONS should give an error > when appearing in MULTILIB_REUSE rather the current behavior. This should be > the object of a future patch. > > The patch in attachment fixes all the issues mentioned above. > > ChangeLog entry is as follows: > > > *** gcc/ChangeLog *** > > 2016-08-01 Thomas Preud'homme <thomas.preudho...@arm.com> > > * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping for > -mcpu=cortex-a7, -mfpu=neon-fp16, -mfpu=fpv5-d16 and -mfpu=fp-armv8. > Fix typo in -mfpu=vfpv3-d16-fp16 mapping. > (MULTILIB_REUSE): Remove reuse rules for option set including > -mfpu=fp-armv8 and -mfpu=vfpv4 > OK. Ramana > > The mappings added have been tested to work as expected and the option > combinations that the intended behavior of removed MULTILIB_REUSE directives > were checked as well. For details, see [1]. Regression testsuite for > arm-none-eabi with aprofile multilib shows no regression. > > Is this ok for trunk? > > Best regards, > > Thomas > > > [1] Format of the tests is as follows: > > # expected mapping > % command line for getting multilib we should be mapping to > expected result > % command line for the multilib that should be mapped to the one above > [before] result without patch > [ after] result with patch > > Provided that the second set of options should indeed be mapped to the first > set, the result [ after] should be the same as the expected result. > > > # cortex-a7 -> armv7-a > % arm-none-eabi-gcc -march=armv7ve -print-multi-directory > v7ve > % arm-none-eabi-gcc -mcpu=cortex-a7 -print-multi-directory > [before] . > [ after] v7ve > > # vfpv3-d16-fp16 -> vfpv3-d16 > % arm-none-eabi-gcc -march=armv7ve -mfpu=vfpv3-d16 -mfloat-abi=hard > -print-multi-directory > v7-a/fpv3/hard > % arm-none-eabi-gcc -march=armv7ve -mfpu=vfpv3-d16-fp16 -mfloat-abi=hard > -print-multi-directory > [before] v7ve/fpv4/hard > [ after] v7-a/fpv3/hard > > # neon-fp16 -> neon > arm-none-eabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=hard > -print-multi-directory > v7-a/simdv1/hard > % arm-none-eabi-gcc -march=armv7-a -mfpu=neon-fp16 -mfloat-abi=hard > -print-multi-directory > [before] v7-a/fpv3/hard > [ after] v7-a/simdv1/hard > > # fpv5-d16 -> vfpv4-d16 > % arm-none-eabi-gcc -march=armv7ve -mfpu=vfpv4-d16 -mfloat-abi=hard > -print-multi-directory > v7ve/fpv4/hard > % arm-none-eabi-gcc -march=armv7ve -mfpu=fpv5-d16 -mfloat-abi=hard > -print-multi-directory > [before] v7ve/fpv4/hard > [ after] v7ve/fpv4/hard > > # fp-armv8 -> vfpv4-d16 > % arm-none-eabi-gcc -march=armv7ve -mfpu=vfpv4-d16 -mfloat-abi=hard > -print-multi-directory > v7ve/fpv4/hard > % arm-none-eabi-gcc -march=armv7ve -mfpu=fp-armv8 -mfloat-abi=hard > -print-multi-directory > [before] v7ve/fpv4/hard > [ after] v7ve/fpv4/hard > > # armv7-a vfpv4 softfp -> armv7-a vfpv3-d16 softfp > % arm-none-eabi-gcc -march=armv7-a -mfpu=vfpv4-d16 -mfloat-abi=softfp > -print-multi-directory > v7-a/fpv3/softfp > % arm-none-eabi-gcc -march=armv7-a -mfpu=vfpv4 -mfloat-abi=softfp > -print-multi-directory > [before] v7-a/fpv3/softfp > [ after] v7-a/fpv3/softfp > > # armv7-a vfpv4 hard -> armv7-a vfpv3-d16 hard > % arm-none-eabi-gcc -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard > -print-multi-directory > v7-a/fpv3/hard > % arm-none-eabi-gcc -march=armv7-a -mfpu=vfpv4 -mfloat-abi=hard > -print-multi-directory > [before] v7-a/fpv3/hard > [ after] v7-a/fpv3/hard > > # armv7ve fp-armv8 softfp -> armv7ve vfpv4-d16 softfp > % arm-none-eabi-gcc -march=armv7ve -mfpu=vfpv4-d16 -mfloat-abi=softfp > -print-multi-directory > v7ve/fpv4/softfp > % arm-none-eabi-gcc -march=armv7ve -mfpu=fp-armv8 -mfloat-abi=softfp > -print-multi-directory > [before] v7ve/fpv4/softfp > [ after] v7ve/fpv4/softfp > > # armv7ve fp-armv8 hard -> armv7ve vfpv4-d16 hard > % arm-none-eabi-gcc -march=armv7ve -mfpu=vfpv4-d16 -mfloat-abi=hard > -print-multi-directory > v7ve/fpv4/hard > % arm-none-eabi-gcc -march=armv7ve -mfpu=fp-armv8 -mfloat-abi=hard > -print-multi-directory > [before] v7ve/fpv4/hard > [ after] v7ve/fpv4/hard > > # armv8-a vfpv4 softfp -> armv7ve vfpv4-d16 softfp > % arm-none-eabi-gcc -march=armv7ve -mfpu=vfpv4-d16 -mfloat-abi=softfp > -print-multi-directory > v7ve/fpv4/softfp > % arm-none-eabi-gcc -march=armv8-a -mfpu=vfpv4 -mfloat-abi=softfp > -print-multi-directory > [before] v7ve/fpv4/softfp > [ after] v7ve/fpv4/softfp > > # armv8-a vfpv4 hard -> armv7ve vfpv4-d16 hard > % arm-none-eabi-gcc -march=armv7ve -mfpu=vfpv4-d16 -mfloat-abi=hard > -print-multi-directory > v7ve/fpv4/hard > % arm-none-eabi-gcc -march=armv8-a -mfpu=vfpv4 -mfloat-abi=hard > -print-multi-directory > [before] v7ve/fpv4/hard > [ after] v7ve/fpv4/hard > > # armv7-a fp-armv8 softfp -> armv7-a vfpv3-d16 softfp > % arm-none-eabi-gcc -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp > -print-multi-directory > v7-a/fpv3/softfp > % arm-none-eabi-gcc -march=armv7-a -mfpu=fp-armv8 -mfloat-abi=softfp > -print-multi-directory > [before] v7-a/fpv3/softfp > [ after] v7-a/fpv3/softfp > > # armv7-a fp-armv8 hard -> armv7-a vfpv3-d16 hard > arm-none-eabi-gcc -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard > -print-multi-directory > v7-a/fpv3/hard > % arm-none-eabi-gcc -march=armv7-a -mfpu=fp-armv8 -mfloat-abi=hard > -print-multi-directory > [before] v7-a/fpv3/hard > [ after] v7-a/fpv3/hard > > # mthumb armv7-a vfpv4 softfp -> mthumb armv7-a vfpv3-d16 softfp > % arm-none-eabi-gcc -mthumb -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp > -print-multi-directory > thumb/v7-a/fpv3/softfp > % arm-none-eabi-gcc -mthumb -march=armv7-a -mfpu=vfpv4 -mfloat-abi=softfp > -print-multi-directory > [before] thumb/v7-a/fpv3/softfp > [ after] thumb/v7-a/fpv3/softfp > > # mthumb armv7-a vfpv4 hard -> mthumb armv7-a vfpv3-d16 hard > % arm-none-eabi-gcc -mthumb -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard > -print-multi-directory > thumb/v7-a/fpv3/hard > % arm-none-eabi-gcc -mthumb -march=armv7-a -mfpu=vfpv4 -mfloat-abi=hard > -print-multi-directory > [before] thumb/v7-a/fpv3/hard > [ after] thumb/v7-a/fpv3/hard > > # mthumb armv7ve fp-armv8 softfp -> mthumb armv7ve vfpv4-d16 softfp > % arm-none-eabi-gcc -mthumb -march=armv7ve -mfpu=vfpv4-d16 -mfloat-abi=softfp > -print-multi-directory > thumb/v7ve/fpv4/softfp > % arm-none-eabi-gcc -mthumb -march=armv7ve -mfpu=fp-armv8 -mfloat-abi=softfp > -print-multi-directory > [before] thumb/v7ve/fpv4/softfp > [ after] thumb/v7ve/fpv4/softfp > > # mthumb armv7ve fp-armv8 hard -> mthumb armv7ve vfpv4-d16 hard > % arm-none-eabi-gcc -mthumb -march=armv7ve -mfpu=vfpv4-d16 -mfloat-abi=hard > -print-multi-directory > thumb/v7ve/fpv4/hard > % arm-none-eabi-gcc -mthumb -march=armv7ve -mfpu=fp-armv8 -mfloat-abi=hard > -print-multi-directory > [before] thumb/v7ve/fpv4/hard > [ after] thumb/v7ve/fpv4/hard > > # mthumb armv8-a vfpv4 softfp -> mthumb armv7ve vfpv4-d16 softfp > % arm-none-eabi-gcc -mthumb -march=armv7ve -mfpu=vfpv4-d16 -mfloat-abi=softfp > -print-multi-directory > thumb/v7ve/fpv4/softfp > % arm-none-eabi-gcc -mthumb -march=armv8-a -mfpu=vfpv4 -mfloat-abi=softfp > -print-multi-directory > [before] thumb/v7ve/fpv4/softfp > [ after] thumb/v7ve/fpv4/softfp > > # mthumb armv8-a vfpv4 hard -> mthumb armv7ve vfpv4-d16 hard > % arm-none-eabi-gcc -mthumb -march=armv7ve -mfpu=vfpv4-d16 -mfloat-abi=hard > -print-multi-directory > thumb/v7ve/fpv4/hard > % arm-none-eabi-gcc -mthumb -march=armv8-a -mfpu=vfpv4 -mfloat-abi=hard > -print-multi-directory > [before] thumb/v7ve/fpv4/hard > [ after] thumb/v7ve/fpv4/hard