[SPARC] Fix PR target/118512

Eric Botcazou botcazou@adacore.com
Sat Jan 18 18:04:05 GMT 2025


This is a regression present on the mainline only, but the underlying issue 
has been latent for years: the compiler and the assembler disagree on the 
support of the VIS 3B SIMD ISA, the former bundling it with VIS 3 but not the 
latter.  IMO the documentation is not very clear, so this patch just aligns 
the compiler with the assembler.

Bootstrapped/regtested on SPARC64/Solaris 11, applied on the mainline.


2025-01-18  Eric Botcazou  <ebotcazou@adacore.com>

	PR target/118512
	* config/sparc/sparc-c.cc (sparc_target_macros): Deal with VIS 3B.
	* config/sparc/sparc.cc (dump_target_flag_bits): Likewise.
	(sparc_option_override): Likewise.
	(sparc_vis_init_builtins): Likewise.
	* config/sparc/sparc.md (fpcmp_vis): Replace TARGET_VIS3 with
	TARGET_VIS3B.
	(vec_cmp): Likewise.
	(fpcmpu_vis): Likewise.
	(vec_cmpu): Likewise.
	(vcond_mask_): Likewise.
	* config/sparc/sparc.opt (VIS3B): New target mask.
	* doc/invoke.texi (SPARC options): Document -mvis3b.


2025-01-18  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc.target/sparc/20230328-1.c: Pass -mvis3b instead of -mvis3.
	* gcc.target/sparc/20230328-4.c: Likewise.
	* gcc.target/sparc/fucmp.c: Likewise.
	* gcc.target/sparc/vis3misc.c: Likewise.

-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr118512.diff
Type: text/x-patch
Size: 12723 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20250118/85c4ef0d/attachment.bin>


More information about the Gcc mailing list