Skip to content

Commit

Permalink
For gcc bug
Browse files Browse the repository at this point in the history
  • Loading branch information
robehn committed Sep 28, 2023
1 parent 6e5545a commit d751602
Show file tree
Hide file tree
Showing 4 changed files with 123,977 additions and 0 deletions.
39 changes: 39 additions & 0 deletions gcc-bug-info/problematic_asm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
000000000000005e <.L2820>:
5e: 6198 ld a4,0(a1)

0000000000000060 <.LBB43490>:
60: 4590 lw a2,8(a1)

0000000000000062 <.LBB43503>:
62: 0ff0000f fence

0000000000000066 <.LBB43492>:
66: 40eb07b3 sub a5,s6,a4

000000000000006a <.LBE43492>:
6a: 00c7d7b3 srl a5,a5,a2

000000000000006e <.LBB43493>:
6e: 2781 sext.w a5,a5

0000000000000070 <.LBB43568>:
70: 16048063 beqz s1,1d0 <.L1^B143>

0000000000000074 <.LBB43572>:
74: 40e48733 sub a4,s1,a4

0000000000000078 <.LBE43586>:
78: 00c75733 srl a4,a4,a2

000000000000007c <.L1^B141>:
7c: 1009262f lr.w a2,(s2)
80: 00e61563 bne a2,a4,8a <.L1^B142>
84: 18f9252f sc.w a0,a5,(s2)
88: f975 bnez a0,7c <.L1^B141>

000000000000008a <.L1^B142>:
8a: 0006079b sext.w a5,a2

000000000000008e <.LVL4238>:
8e: 0ff0000f fence

20 changes: 20 additions & 0 deletions gcc-bug-info/problematic_method.ii
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
template<size_t byte_size>
template<typename T>
inline T Atomic::PlatformCmpxchg<byte_size>::operator()(T volatile* dest __attribute__((unused)),
T compare_value,
T exchange_value,
atomic_memory_order order) const {
static_assert((byte_size == sizeof(T)), "byte_size == sizeof(T)");
if (order != memory_order_relaxed) {
__sync_synchronize();
}

__atomic_compare_exchange(dest, &compare_value, &exchange_value, false,
0, 0);

if (order != memory_order_relaxed) {
__sync_synchronize();
}
return compare_value;
}

Loading

0 comments on commit d751602

Please sign in to comment.