Move inline assembly into arch defines blocks

Этот коммит содержится в:
Brandon Potter
2024-07-30 12:56:32 -05:00
родитель ca36cc249e
Коммит 73303ca2d2
3 изменённых файлов: 34 добавлений и 6 удалений
+6 -2
Просмотреть файл
@@ -391,20 +391,24 @@ __device__ bool enough_space(BlockHandle *h, uint64_t required) {
__device__ void refresh_volatile_dwordx2(volatile uint64_t *assigned_value,
volatile uint64_t *read_value) {
__asm__ volatile(
#if __gfx90a__
asm volatile(
"global_load_dwordx2 %0 %1 off glc slc\n "
"s_waitcnt vmcnt(0)"
: "=v"(*assigned_value)
: "v"(read_value));
#endif
}
__device__ void refresh_volatile_sbyte(volatile int *assigned_value,
volatile char *read_value) {
__asm__ volatile(
#if __gfx90a__
asm volatile(
"global_load_sbyte %0 %1 off glc slc\n "
"s_waitcnt vmcnt(0)"
: "=v"(*assigned_value)
: "v"(read_value));
#endif
}
__device__ void acquire_lock(BlockHandle *handle) {