[Mesa-dev] [Bug 93089] mesa fails to check for gcc atomic primitives before using them

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Nov 30 17:11:21 PST 2015


https://bugs.freedesktop.org/show_bug.cgi?id=93089

--- Comment #2 from Jonathan Gray <jsg at openbsd.org> ---
It seems mips64 got the sync builtins later than other platforms, they are
available in later versions of gcc but not gcc 4.2.

Alpha also hit an ICE so for now we stopped building Mesa on alpha/mips64 in
OpenBSD.

lib/mesa/src/mesa/main/format_pack.c  -fPIC -DPIC -o main/.libs/format_pack.o   
/usr/xenocara/lib/mesa/src/mesa/main/format_pack.c: In function
'pack_float_bgr_srgb8':                                      
/usr/xenocara/lib/mesa/src/mesa/main/format_pack.c:6890: error: unrecognizable
insn:                                         
(insn 259 11 13 2 (set (reg:SF 1 $1)                                            
        (const_double:SF 1.220703125e-4 [0x0.8p-12])) -1 (nil)                  
    (nil))                                                                      
/usr/xenocara/lib/mesa/src/mesa/main/format_pack.c:6890: internal compiler
error: in extract_insn, at recog.c:2077

For other architectures we currently build with:

#elif defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_5__) || \
      defined(__hppa__) || defined(__sparc__) || defined(__sh__)
#define PIPE_ATOMIC_UNLOCKED

...

#if defined(PIPE_ATOMIC_UNLOCKED)

#define PIPE_ATOMIC "Unlocked"

#define p_atomic_set(_v, _i) (*(_v) = (_i))
#define p_atomic_read(_v) (*(_v))
#define p_atomic_dec_zero(_v) ((*(_v) -= 1) == 0)
#define p_atomic_inc(_v) (*(_v) += 1)
#define p_atomic_dec(_v) (*(_v) -= 1)
#define p_atomic_add(_v, _i) (*(_v) += (_i))
#define p_atomic_inc_return(_v) (*(_v) += 1)
#define p_atomic_dec_return(_v) (*(_v) -= 1)
#define p_atomic_cmpxchg(_v, old, _new) ({    \
    __typeof(*_v) _r = *(_v);        \
    if (*(_v) == old)            \
        *(_v) = (_new);            \
    _r;                    \
})
#endif

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151201/23105c48/attachment.html>


More information about the mesa-dev mailing list