<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Implement atomic operations for M68k"
href="https://bugs.llvm.org/show_bug.cgi?id=48892">48892</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Implement atomic operations for M68k
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: M68k
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>glaubitz@physik.fu-berlin.de
</td>
</tr>
<tr>
<th>CC</th>
<td>glaubitz@physik.fu-berlin.de, llvm-bugs@lists.llvm.org, minyihh@uci.edu
</td>
</tr></table>
<p>
<div>
<pre>The M68k is not implementing any atomic operations yet which include load and
store operations and compare_and_swap.
Load operations:
- atomic_load_8 - using MOV8rm
- atomic_load_16 - using MOV16rm
- atomic_load_32 - using MOV32rm
Store operations:
- atomic_store_8 - using MOV8mr
- atomic_store_16 - using MOV16mr
- atomic_store_32 - using MOV32mr
Compare-and-swap:
- atomic_cmp_swap_32 - using CAS
- atomic_cmp_swap_64 - using CAS2
Without support for atomic operations, compiling some C++ code currently fails
with:
glaubitz@epyc:..openscad-2019.05/src>
/local_scratch/glaubitz/M680x0-mono-repo/build/bin/clang -target m68k-linux-gnu
localscope.cc -o localscope.o -I
/usr/m68k-linux-gnu/include/c++/10/m68k-linux-gnu/ -I
/usr/m68k-linux-gnu/include/ -I /usr/include/glib-2.0 -I
/usr/lib/m68k-linux-gnu/glib-2.0/include/
fatal error: error in backend: Cannot select: 0x55f0fc5b1ea8: i8,ch =
AtomicLoad<(dereferenceable load acquire 1 from `i8* bitcast (i64*
@_ZGVZN5boost6system6detail15to_std_categoryERKNS0_14error_categoryEE4map_ to
i8*)`, align 4)> 0x55f0fc31e988, 0x55f0fc5ae8c8
0x55f0fc5ae8c8: i32 = M680x0ISD::WrapperPC TargetGlobalAddress:i32<i64*
@_ZGVZN5boost6system6detail15to_std_categoryERKNS0_14error_categoryEE4map_> 0
0x55f0fc5aec70: i32 = TargetGlobalAddress<i64*
@_ZGVZN5boost6system6detail15to_std_categoryERKNS0_14error_categoryEE4map_> 0
In function: _ZN5boost6system6detail15to_std_categoryERKNS0_14error_categoryE
clang-12: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 12.0.0 (<a href="mailto:git@github.com">git@github.com</a>:M680x0/M680x0-mono-repo.git
c5834ffbda019df8c94c669c658d804cb9c19af3)
Target: m68k-unknown-linux-gnu
Thread model: posix
InstalledDir: /local_scratch/glaubitz/M680x0-mono-repo/build/bin
clang-12: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/localscope-405c82.cpp
clang-12: note: diagnostic msg: /tmp/localscope-405c82.sh
clang-12: note: diagnostic msg:
********************
glaubitz@epyc:..openscad-2019.05/src></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>