diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gcc.target/sparc/mnofpu.c | |
download | cbb-gcc-4.6.4-15d2061ac0796199866debe9ac87130894b0cdd3.tar.bz2 cbb-gcc-4.6.4-15d2061ac0796199866debe9ac87130894b0cdd3.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gcc.target/sparc/mnofpu.c')
-rw-r--r-- | gcc/testsuite/gcc.target/sparc/mnofpu.c | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/sparc/mnofpu.c b/gcc/testsuite/gcc.target/sparc/mnofpu.c new file mode 100644 index 000000000..351585dd7 --- /dev/null +++ b/gcc/testsuite/gcc.target/sparc/mnofpu.c @@ -0,0 +1,90 @@ +/* PR target/35664 */ +/* Tetstcase by Mike Stein <mstein.lists@googlemail.com> */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -mno-fpu" } */ + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +typedef unsigned long long u64; +struct pt_regs { +}; +static inline __attribute__((always_inline)) struct task_struct *__get_current(void) +{ +} +static inline __attribute__((always_inline)) u32 flip_dword (u32 l) +{ + return ((l&0xff)<<24) | (((l>>8)&0xff)<<16) | (((l>>16)&0xff)<<8)| ((l>>24)&0xff); +} +static inline __attribute__((always_inline)) u32 __readl(const volatile void *addr) +{ + return flip_dword(*( volatile u32 *)addr); +} +enum e1e_registers { + E1000_PRC64 = 0x0405C, + E1000_PRC127 = 0x04060, + E1000_PRC255 = 0x04064, + E1000_PTC511 = 0x040E4, + E1000_PTC1023 = 0x040E8, + E1000_PTC1522 = 0x040EC, + E1000_MPTC = 0x040F0, +}; +enum e1000_media_type { + e1000_media_type_copper = 1, +}; +struct e1000_rx_desc { + struct { + } wb; +}; +struct e1000_hw_stats { + u64 prc64; + u64 prc127; + u64 prc255; + u64 ptc511; + u64 ptc1023; + u64 ptc1522; + u64 mptc; +}; +struct e1000_shadow_ram { + u16 value; +}; +struct e1000_dev_spec_ich8lan { + struct e1000_shadow_ram shadow_ram[2048]; +}; +struct e1000_hw { + u8 *hw_addr; + union { + struct e1000_dev_spec_ich8lan ich8lan; + } dev_spec; + enum e1000_media_type media_type; +}; +struct e1000_adapter { + u16 link_speed; + struct e1000_hw hw; + struct e1000_hw_stats stats; + unsigned int flags; +}; +static inline __attribute__((always_inline)) u32 __er32(struct e1000_hw *hw, unsigned long reg) +{ + return __readl(hw->hw_addr + reg); +} +void e1000e_update_stats(struct e1000_adapter *adapter) +{ + struct e1000_hw *hw = &adapter->hw; + u16 phy_tmp; + if (adapter->flags & (1 << 10)) { + adapter->stats.prc64 += __er32(hw, E1000_PRC64); + adapter->stats.prc127 += __er32(hw, E1000_PRC127); + adapter->stats.prc255 += __er32(hw, E1000_PRC255); + adapter->stats.ptc511 += __er32(hw, E1000_PTC511); + adapter->stats.ptc1023 += __er32(hw, E1000_PTC1023); + adapter->stats.ptc1522 += __er32(hw, E1000_PTC1522); + } + adapter->stats.mptc += __er32(hw, E1000_MPTC); + if (hw->media_type == e1000_media_type_copper) { + if ((adapter->link_speed == 1000) && + (!e1e_rphy(hw, 0x0A, &phy_tmp))) { + } + } +} |