re PR target/37812 (Invalid mnemonic 'lvlx')
PR target/37812 * gcc.target/powerpc/altivec_check.h (altivec_cell_check): Abort if __PPU__ isn't defined. * lib/target-supports.exp (check_effective_target_powerpc_ppu_ok): New. * gcc.target/powerpc/altivec-cell-8.c: Use powerpc_ppu_ok. From-SVN: r141564
This commit is contained in:
parent
c6ff44935c
commit
f7790b41c6
|
@ -1,3 +1,12 @@
|
|||
2008-11-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/37812
|
||||
* gcc.target/powerpc/altivec_check.h (altivec_cell_check): Abort
|
||||
if __PPU__ isn't defined.
|
||||
* lib/target-supports.exp (check_effective_target_powerpc_ppu_ok):
|
||||
New.
|
||||
* gcc.target/powerpc/altivec-cell-8.c: Use powerpc_ppu_ok.
|
||||
|
||||
2008-11-03 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gcc.c-torture/execute/20081103-1.c: New test.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* { dg-do run } */
|
||||
/* { dg-require-effective-target powerpc_altivec_ok } */
|
||||
/* { dg-require-effective-target powerpc_ppu_ok } */
|
||||
/* { dg-options "-O2 -maltivec -mabi=altivec -mcpu=cell" } */
|
||||
#include <altivec.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -25,6 +25,7 @@ void altivec_check(void) {
|
|||
|
||||
void altivec_cell_check (void)
|
||||
{
|
||||
#ifdef __PPU__
|
||||
/* Exit on systems without the Cell Altivec instructions. */
|
||||
signal (SIGILL, sig_ill_handler);
|
||||
#ifdef __MACH__
|
||||
|
@ -35,4 +36,8 @@ void altivec_cell_check (void)
|
|||
asm volatile ("lvlx 0,0,0");
|
||||
#endif
|
||||
signal (SIGILL, SIG_DFL);
|
||||
#else
|
||||
/* altivec_cell_check shouldn't be called without -mcpu=cell. */
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 1999, 2001, 2003, 2004, 2005, 2006, 2007
|
||||
# Copyright (C) 1999, 2001, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
@ -1390,6 +1390,25 @@ proc check_effective_target_powerpc_altivec_ok { } {
|
|||
}
|
||||
}
|
||||
|
||||
# Return 1 if this is a PowerPC target supporting -mcpu=cell.
|
||||
|
||||
proc check_effective_target_powerpc_ppu_ok { } {
|
||||
if [check_effective_target_powerpc_altivec_ok] {
|
||||
return [check_no_compiler_messages cell_asm_available object {
|
||||
int main (void) {
|
||||
#ifdef __MACH__
|
||||
asm volatile ("lvlx v0,v0,v0");
|
||||
#else
|
||||
asm volatile ("lvlx 0,0,0");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
}]
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
# Return 1 if this is a PowerPC target that supports SPU.
|
||||
|
||||
proc check_effective_target_powerpc_spu { } {
|
||||
|
|
Loading…
Reference in New Issue