summary refs log tree commit diff stats
path: root/include/qemu/compiler.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-10-05 18:52:58 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-10-05 18:52:58 +0100
commite2e3436add538be0e558cdc42f3e6b76e9deb0f9 (patch)
tree9c96696d85c987d7d41630307f57b96c1ec423e0 /include/qemu/compiler.h
parent3c2d3042849686969add641bd38b08b9877b9e8f (diff)
parentedbc4b24bbb179fa9562d4e5313470f10569433c (diff)
downloadfocaccia-qemu-e2e3436add538be0e558cdc42f3e6b76e9deb0f9.tar.gz
focaccia-qemu-e2e3436add538be0e558cdc42f3e6b76e9deb0f9.zip
Merge remote-tracking branch 'remotes/kraxel/tags/vga-20181005-pull-request' into staging
vga: edid fixes, qxl clang workaround, vga mmio subregion fix.

# gpg: Signature made Fri 05 Oct 2018 12:11:40 BST
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/vga-20181005-pull-request:
  edid: fix vendor default
  secondary-vga: delete mmio subregions upon exit
  hw/display/qxl: Suppress clang-7 warning about misaligned atomic operation
  edid: Ignore built binary

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/qemu/compiler.h')
-rw-r--r--include/qemu/compiler.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 5843812710..bf47e7bee4 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -122,6 +122,15 @@
 #ifndef __has_feature
 #define __has_feature(x) 0 /* compatibility with non-clang compilers */
 #endif
+
+#ifndef __has_builtin
+#define __has_builtin(x) 0 /* compatibility with non-clang compilers */
+#endif
+
+#if __has_builtin(__builtin_assume_aligned) || QEMU_GNUC_PREREQ(4, 7)
+#define HAS_ASSUME_ALIGNED
+#endif
+
 /* Implement C11 _Generic via GCC builtins.  Example:
  *
  *    QEMU_GENERIC(x, (float, sinf), (long double, sinl), sin) (x)