NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-evbarm/48368



The following reply was made to PR port-evbarm/48368; it has been noted by 
GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: petri.laakso%asd.fi@localhost, skrll%NetBSD.org@localhost, 
matt%NetBSD.org@localhost, mrg%NetBSD.org@localhost
Subject: Re: port-evbarm/48368
Date: Sun, 2 Feb 2014 14:08:55 +0100

 --ZPt4rx8FFjLCG7dd
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 The attached test program should point out all missing __sync_* builtins
 (as of gcc 4.8.x, generated form sync-builtins.def).
 
 Works on sparc64 and amd64, fails with these errors on arm:
 
 all_sync_ops_linkable.c: In function 'main':
 all_sync_ops_linkable.c:32:23: note: '__sync_fetch_and_nand' changed semantics 
in GCC 4.4
   __sync_fetch_and_nand(&u8, 0x80);
                        ^
 all_sync_ops_linkable.c:62:23: note: '__sync_nand_and_fetch' changed semantics 
in GCC 4.4
   __sync_nand_and_fetch(&u8, 5);
                        ^
 /var/tmp//ccn4Hmic.o: In function `main':
 all_sync_ops_linkable.c:(.text.startup+0x20): undefined reference to 
`__sync_add_and_fetch_1'
 all_sync_ops_linkable.c:(.text.startup+0x2c): undefined reference to 
`__sync_add_and_fetch_1'
 all_sync_ops_linkable.c:(.text.startup+0x38): undefined reference to 
`__sync_add_and_fetch_2'
 all_sync_ops_linkable.c:(.text.startup+0x54): undefined reference to 
`__sync_add_and_fetch_8'
 all_sync_ops_linkable.c:(.text.startup+0xb0): undefined reference to 
`__sync_val_compare_and_swap_8'
 all_sync_ops_linkable.c:(.text.startup+0xbc): undefined reference to 
`__sync_fetch_and_add_1'
 all_sync_ops_linkable.c:(.text.startup+0xc8): undefined reference to 
`__sync_fetch_and_add_1'
 all_sync_ops_linkable.c:(.text.startup+0xd4): undefined reference to 
`__sync_fetch_and_add_2'
 all_sync_ops_linkable.c:(.text.startup+0xf0): undefined reference to 
`__sync_fetch_and_add_8'
 all_sync_ops_linkable.c:(.text.startup+0xfc): undefined reference to 
`__sync_fetch_and_and_1'
 all_sync_ops_linkable.c:(.text.startup+0x108): undefined reference to 
`__sync_fetch_and_and_1'
 all_sync_ops_linkable.c:(.text.startup+0x114): undefined reference to 
`__sync_fetch_and_and_2'
 all_sync_ops_linkable.c:(.text.startup+0x130): undefined reference to 
`__sync_fetch_and_and_8'
 all_sync_ops_linkable.c:(.text.startup+0x13c): undefined reference to 
`__sync_fetch_and_nand_1'
 all_sync_ops_linkable.c:(.text.startup+0x148): undefined reference to 
`__sync_fetch_and_nand_1'
 all_sync_ops_linkable.c:(.text.startup+0x154): undefined reference to 
`__sync_fetch_and_nand_2'
 all_sync_ops_linkable.c:(.text.startup+0x160): undefined reference to 
`__sync_fetch_and_nand_4'
 all_sync_ops_linkable.c:(.text.startup+0x170): undefined reference to 
`__sync_fetch_and_nand_8'
 all_sync_ops_linkable.c:(.text.startup+0x17c): undefined reference to 
`__sync_fetch_and_or_1'
 all_sync_ops_linkable.c:(.text.startup+0x188): undefined reference to 
`__sync_fetch_and_or_1'
 all_sync_ops_linkable.c:(.text.startup+0x194): undefined reference to 
`__sync_fetch_and_or_2'
 all_sync_ops_linkable.c:(.text.startup+0x1b0): undefined reference to 
`__sync_fetch_and_or_8'
 all_sync_ops_linkable.c:(.text.startup+0x1bc): undefined reference to 
`__sync_fetch_and_sub_1'
 all_sync_ops_linkable.c:(.text.startup+0x1c8): undefined reference to 
`__sync_fetch_and_sub_1'
 all_sync_ops_linkable.c:(.text.startup+0x1d4): undefined reference to 
`__sync_fetch_and_sub_2'
 all_sync_ops_linkable.c:(.text.startup+0x1e0): undefined reference to 
`__sync_fetch_and_sub_4'
 all_sync_ops_linkable.c:(.text.startup+0x1f0): undefined reference to 
`__sync_fetch_and_sub_8'
 all_sync_ops_linkable.c:(.text.startup+0x1fc): undefined reference to 
`__sync_fetch_and_xor_1'
 all_sync_ops_linkable.c:(.text.startup+0x208): undefined reference to 
`__sync_fetch_and_xor_1'
 all_sync_ops_linkable.c:(.text.startup+0x214): undefined reference to 
`__sync_fetch_and_xor_2'
 all_sync_ops_linkable.c:(.text.startup+0x224): undefined reference to 
`__sync_fetch_and_xor_4'
 all_sync_ops_linkable.c:(.text.startup+0x234): undefined reference to 
`__sync_fetch_and_xor_8'
 all_sync_ops_linkable.c:(.text.startup+0x274): undefined reference to 
`__sync_val_compare_and_swap_8'
 all_sync_ops_linkable.c:(.text.startup+0x2a0): undefined reference to 
`__sync_lock_test_and_set_1'
 all_sync_ops_linkable.c:(.text.startup+0x2ac): undefined reference to 
`__sync_lock_test_and_set_1'
 all_sync_ops_linkable.c:(.text.startup+0x2b8): undefined reference to 
`__sync_lock_test_and_set_2'
 all_sync_ops_linkable.c:(.text.startup+0x2c4): undefined reference to 
`__sync_lock_test_and_set_4'
 all_sync_ops_linkable.c:(.text.startup+0x2d4): undefined reference to 
`__sync_lock_test_and_set_8'
 all_sync_ops_linkable.c:(.text.startup+0x2e0): undefined reference to 
`__sync_nand_and_fetch_1'
 all_sync_ops_linkable.c:(.text.startup+0x2ec): undefined reference to 
`__sync_nand_and_fetch_1'
 all_sync_ops_linkable.c:(.text.startup+0x2f8): undefined reference to 
`__sync_nand_and_fetch_2'
 all_sync_ops_linkable.c:(.text.startup+0x304): undefined reference to 
`__sync_nand_and_fetch_4'
 all_sync_ops_linkable.c:(.text.startup+0x314): undefined reference to 
`__sync_nand_and_fetch_8'
 all_sync_ops_linkable.c:(.text.startup+0x320): undefined reference to 
`__sync_or_and_fetch_1'
 all_sync_ops_linkable.c:(.text.startup+0x32c): undefined reference to 
`__sync_or_and_fetch_1'
 all_sync_ops_linkable.c:(.text.startup+0x338): undefined reference to 
`__sync_or_and_fetch_2'
 all_sync_ops_linkable.c:(.text.startup+0x354): undefined reference to 
`__sync_or_and_fetch_8'
 all_sync_ops_linkable.c:(.text.startup+0x360): undefined reference to 
`__sync_sub_and_fetch_1'
 all_sync_ops_linkable.c:(.text.startup+0x36c): undefined reference to 
`__sync_sub_and_fetch_1'
 all_sync_ops_linkable.c:(.text.startup+0x378): undefined reference to 
`__sync_sub_and_fetch_2'
 all_sync_ops_linkable.c:(.text.startup+0x384): undefined reference to 
`__sync_sub_and_fetch_4'
 all_sync_ops_linkable.c:(.text.startup+0x394): undefined reference to 
`__sync_sub_and_fetch_8'
 all_sync_ops_linkable.c:(.text.startup+0x3f0): undefined reference to 
`__sync_val_compare_and_swap_8'
 all_sync_ops_linkable.c:(.text.startup+0x3fc): undefined reference to 
`__sync_xor_and_fetch_1'
 all_sync_ops_linkable.c:(.text.startup+0x408): undefined reference to 
`__sync_xor_and_fetch_1'
 all_sync_ops_linkable.c:(.text.startup+0x414): undefined reference to 
`__sync_xor_and_fetch_2'
 all_sync_ops_linkable.c:(.text.startup+0x420): undefined reference to 
`__sync_xor_and_fetch_4'
 all_sync_ops_linkable.c:(.text.startup+0x430): undefined reference to 
`__sync_xor_and_fetch_8'
 
 
 Martin
 
 --ZPt4rx8FFjLCG7dd
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="all_sync_ops_linkable.c"
 
 #include <sys/inttypes.h>
 
 volatile uint8_t u8 = 0;
 volatile uint16_t u16 = 0;
 volatile uint32_t u32 = 0;
 volatile uint64_t u64 = 0;
 
 int
 main(int argc, char **argv)
 {
        __sync_synchronize();
        __sync_add_and_fetch(&u8, 1);
        __sync_add_and_fetch_1(&u8, 1);
        __sync_add_and_fetch_2(&u16, 1);
        __sync_add_and_fetch_4(&u32, 1);
        __sync_add_and_fetch_8(&u64, 1);
        __sync_bool_compare_and_swap(&u8, 1, 2);
        __sync_bool_compare_and_swap_1(&u8, 1, 2);
        __sync_bool_compare_and_swap_2(&u16, 1, 2);
        __sync_bool_compare_and_swap_4(&u32, 1, 2);
        __sync_bool_compare_and_swap_8(&u64, 1, 2);
        __sync_fetch_and_add(&u8, 1);
        __sync_fetch_and_add_1(&u8, 1);
        __sync_fetch_and_add_2(&u16, 1);
        __sync_fetch_and_add_4(&u32, 1);
        __sync_fetch_and_add_8(&u64, 1);
        __sync_fetch_and_and(&u8, 0x80);
        __sync_fetch_and_and_1(&u8, 0x80);
        __sync_fetch_and_and_2(&u16, 0x80);
        __sync_fetch_and_and_4(&u32, 0x80);
        __sync_fetch_and_and_8(&u64, 0x80);
        __sync_fetch_and_nand(&u8, 0x80);
        __sync_fetch_and_nand_1(&u8, 0x80);
        __sync_fetch_and_nand_2(&u16, 0x80);
        __sync_fetch_and_nand_4(&u32, 0x80);
        __sync_fetch_and_nand_8(&u64, 0x80);
        __sync_fetch_and_or(&u8, 0x80);
        __sync_fetch_and_or_1(&u8, 0x80);
        __sync_fetch_and_or_2(&u16, 0x80);
        __sync_fetch_and_or_4(&u32, 0x80);
        __sync_fetch_and_or_8(&u64, 0x80);
        __sync_fetch_and_sub(&u8, 0x80);
        __sync_fetch_and_sub_1(&u8, 0x80);
        __sync_fetch_and_sub_2(&u16, 0x80);
        __sync_fetch_and_sub_4(&u32, 0x80);
        __sync_fetch_and_sub_8(&u64, 0x80);
        __sync_fetch_and_xor(&u8, 0x80);
        __sync_fetch_and_xor_1(&u8, 0x80);
        __sync_fetch_and_xor_2(&u16, 0x80);
        __sync_fetch_and_xor_4(&u32, 0x80);
        __sync_fetch_and_xor_8(&u64, 0x80);
        __sync_lock_release(&u8);
        __sync_lock_release_1(&u8);
        __sync_lock_release_2(&u16);
        __sync_lock_release_4(&u32);
        __sync_lock_release_8(&u64);
        __sync_lock_test_and_set(&u8, 5);
        __sync_lock_test_and_set_1(&u8, 5);
        __sync_lock_test_and_set_2(&u16, 5);
        __sync_lock_test_and_set_4(&u32, 5);
        __sync_lock_test_and_set_8(&u64, 5);
        __sync_nand_and_fetch(&u8, 5);
        __sync_nand_and_fetch_1(&u8, 5);
        __sync_nand_and_fetch_2(&u16, 5);
        __sync_nand_and_fetch_4(&u32, 5);
        __sync_nand_and_fetch_8(&u64, 5);
        __sync_or_and_fetch(&u8, 5);
        __sync_or_and_fetch_1(&u8, 5);
        __sync_or_and_fetch_2(&u16, 5);
        __sync_or_and_fetch_4(&u32, 5);
        __sync_or_and_fetch_8(&u64, 5);
        __sync_sub_and_fetch(&u8, 5);
        __sync_sub_and_fetch_1(&u8, 5);
        __sync_sub_and_fetch_2(&u16, 5);
        __sync_sub_and_fetch_4(&u32, 5);
        __sync_sub_and_fetch_8(&u64, 5);
        __sync_val_compare_and_swap(&u8, 5, 9);
        __sync_val_compare_and_swap_1(&u8, 5, 9);
        __sync_val_compare_and_swap_2(&u16, 5, 9);
        __sync_val_compare_and_swap_4(&u32, 5, 9);
        __sync_val_compare_and_swap_8(&u64, 5, 9);
        __sync_xor_and_fetch(&u8, 5);
        __sync_xor_and_fetch_1(&u8, 5);
        __sync_xor_and_fetch_2(&u16, 5);
        __sync_xor_and_fetch_4(&u32, 5);
        __sync_xor_and_fetch_8(&u64, 5);
 
        return 0;
 }
 
 
 --ZPt4rx8FFjLCG7dd--
 


Home | Main Index | Thread Index | Old Index