]> Git Repo - qemu.git/commitdiff
Merge tag 'fixes-pull-request' of gitlab.com:marcandre.lureau/qemu into staging
authorPeter Maydell <[email protected]>
Tue, 22 Mar 2022 18:43:03 +0000 (18:43 +0000)
committerPeter Maydell <[email protected]>
Tue, 22 Mar 2022 18:43:03 +0000 (18:43 +0000)
Fixes and cleanups for 7.0

Hi,

A collection of fixes & cleanup patches that should be safe for 7.0 inclusion.

# gpg: Signature made Tue 22 Mar 2022 12:11:30 GMT
# gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
# gpg:                issuer "[email protected]"
# gpg: Good signature from "Marc-AndrĂ© Lureau <[email protected]>" [full]
# gpg:                 aka "Marc-AndrĂ© Lureau <[email protected]>" [full]
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5

* tag 'fixes-pull-request' of gitlab.com:marcandre.lureau/qemu: (21 commits)
  qapi: remove needless include
  Remove trailing ; after G_DEFINE_AUTO macro
  tests: remove needless include
  error: use GLib to remember the program name
  qga: remove bswap.h include
  qapi: remove needless include
  meson: fix CONFIG_ATOMIC128 check
  meson: move int128 checks from configure
  qapi: remove needless include
  util: remove the net/net.h dependency
  util: remove needless includes
  scripts/modinfo-collect: remove unused/dead code
  Move HOST_LONG_BITS to compiler.h
  Simplify HOST_LONG_BITS
  compiler.h: replace QEMU_SENTINEL with G_GNUC_NULL_TERMINATED
  compiler.h: replace QEMU_WARN_UNUSED_RESULT with G_GNUC_WARN_UNUSED_RESULT
  Replace GCC_FMT_ATTR with G_GNUC_PRINTF
  Drop qemu_foo() socket API wrapper
  m68k/nios2-semi: fix gettimeofday() result check
  vl: typo fix in a comment
  ...

Signed-off-by: Peter Maydell <[email protected]>
1  2 
meson.build

diff --combined meson.build
index f71e1a146829148ac7587b58f20162e653801f9e,58520aab508fa1984eae6305e9248fccb06aed16..aef724ad3c0efa1f215704656c50f7e4e83fa854
@@@ -3,9 -3,9 +3,9 @@@ project('qemu', ['c'], meson_version: '
                            'b_staticpic=false', 'stdsplit=false'],
          version: files('VERSION'))
  
 -add_test_setup('quick', exclude_suites: ['block', 'slow', 'thorough'], is_default: true)
 -add_test_setup('slow', exclude_suites: ['block', 'thorough'], env: ['G_TEST_SLOW=1', 'SPEED=slow'])
 -add_test_setup('thorough', exclude_suites: ['block'], env: ['G_TEST_SLOW=1', 'SPEED=thorough'])
 +add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true)
 +add_test_setup('slow', exclude_suites: ['thorough'], env: ['G_TEST_SLOW=1', 'SPEED=slow'])
 +add_test_setup('thorough', env: ['G_TEST_SLOW=1', 'SPEED=thorough'])
  
  not_found = dependency('', required: false)
  keyval = import('keyval')
@@@ -1853,21 -1853,57 +1853,57 @@@ config_host_data.set('HAVE_BROKEN_SIZE_
          return printf("%zu", SIZE_MAX);
      }''', args: ['-Werror']))
  
- # See if 64-bit atomic operations are supported.
- # Note that without __atomic builtins, we can only
- # assume atomic loads/stores max at pointer size.
- config_host_data.set('CONFIG_ATOMIC64', cc.links('''
+ atomic_test = '''
    #include <stdint.h>
    int main(void)
    {
-     uint64_t x = 0, y = 0;
+     @0@ x = 0, y = 0;
      y = __atomic_load_n(&x, __ATOMIC_RELAXED);
      __atomic_store_n(&x, y, __ATOMIC_RELAXED);
      __atomic_compare_exchange_n(&x, &y, x, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
      __atomic_exchange_n(&x, y, __ATOMIC_RELAXED);
      __atomic_fetch_add(&x, y, __ATOMIC_RELAXED);
      return 0;
-   }'''))
+   }'''
+ # See if 64-bit atomic operations are supported.
+ # Note that without __atomic builtins, we can only
+ # assume atomic loads/stores max at pointer size.
+ config_host_data.set('CONFIG_ATOMIC64', cc.links(atomic_test.format('uint64_t')))
+ has_int128 = cc.links('''
+   __int128_t a;
+   __uint128_t b;
+   int main (void) {
+     a = a + b;
+     b = a * b;
+     a = a * a;
+     return 0;
+   }''')
+ config_host_data.set('CONFIG_INT128', has_int128)
+ if has_int128
+   # "do we have 128-bit atomics which are handled inline and specifically not
+   # via libatomic". The reason we can't use libatomic is documented in the
+   # comment starting "GCC is a house divided" in include/qemu/atomic128.h.
+   has_atomic128 = cc.links(atomic_test.format('unsigned __int128'))
+   config_host_data.set('CONFIG_ATOMIC128', has_atomic128)
+   if not has_atomic128
+     has_cmpxchg128 = cc.links('''
+       int main(void)
+       {
+         unsigned __int128 x = 0, y = 0;
+         __sync_val_compare_and_swap_16(&x, y, x);
+         return 0;
+       }
+     ''')
+     config_host_data.set('CONFIG_CMPXCHG128', has_cmpxchg128)
+   endif
+ endif
  
  config_host_data.set('CONFIG_GETAUXVAL', cc.links(gnu_source_prefix + '''
    #include <sys/auxv.h>
This page took 0.032191 seconds and 4 git commands to generate.