OSDN Git Service

target/i386: Assert CODE64 for x86_64 user-only
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 14 May 2021 15:13:04 +0000 (10:13 -0500)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 19 May 2021 17:15:46 +0000 (12:15 -0500)
commiteec7d0f8386b600046843117d86b1189491cc5df
tree1a4fb0f97b2f7c620ccb6357536a220b86f8b67b
parentb40a47a17f9e5ed75287e9f6b6fb1b9d4a3a0c25
target/i386: Assert CODE64 for x86_64 user-only

For x86_64 user-only, there is no way to leave 64-bit mode.

Without x86_64, there is no way to enter 64-bit mode.  There is
an existing macro to aid with that; simply place it in the right
place in the ifdef chain.

Since we're adding an accessor macro, pull the value directly out
of flags when we're not assuming a constant.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210514151342.384376-13-richard.henderson@linaro.org>
target/i386/tcg/translate.c