Skip to content

Commit

Permalink
External Release v2023.06.07
Browse files Browse the repository at this point in the history
General:
  - Updated Python version requirement to 3.7

Fixed:
  - Re-enable XED root directory renaming (fixes #300)
  - Disassembler: Add CET "notrack" prefix emit (#278)

Improved:
  - Improve decoder code size
  - XED Examples: Improve Code Quality
  • Loading branch information
sdeadmin committed Jun 7, 2023
1 parent a3055cd commit 4dc7713
Show file tree
Hide file tree
Showing 34 changed files with 415 additions and 181 deletions.
29 changes: 18 additions & 11 deletions .github/scripts/sanity_external.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BEGIN_LEGAL
#BEGIN_LEGAL
#
# Copyright (c) 2022 Intel Corporation
#Copyright (c) 2023 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,8 +13,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# END_LEGAL
#
#END_LEGAL
""""XED External Sanity Check"""
from pathlib import Path
import platform
Expand All @@ -35,22 +35,29 @@ def main(env):
xed_builder = 'mfile.py'
flags='test'
# {32b,64b} x {shared,dynamic} link
for size in ['ia32', 'x86-64']:
for host in ['ia32', 'x86-64']:
link_options = [('static', ''), ('dynamic', ' --shared')]
if env['compiler'] == utils.CLANG and platform.system() == 'Windows':
# TODO - Fix clang dynamic build on windows (Jira SDE-3049)
# TODO - Fix clang dynamic build on windows
link_options = [('static', '')]
for linkkind, link in link_options:
dir = f'obj-general-{env["pyver"]}-{size}-{linkkind}'
dir = f'obj-general-{env["pyver"]}-{host}-{linkkind}'
build_dir = Path(kits_dir, utils.KIT_PREFIX_PATT + dir)
cmd = utils.gen_build_cmd(env, xed_builder, '', build_dir, size, flags + link)
cmd = utils.gen_build_cmd(env, xed_builder, '', build_dir, host, flags + link)
commands.append(cmd)

# do a build with asserts enabled
size = 'x86-64'
dir = f'obj-assert-{env["pyver"]}-{size}'
host = 'x86-64'
dir = f'obj-assert-{env["pyver"]}-{host}'
build_dir = Path(kits_dir, utils.KIT_PREFIX_PATT + dir)
cmd = utils.gen_build_cmd(env, xed_builder, '', build_dir, host, flags + ' --assert')
commands.append(cmd)

# Test opt=3 build
host = 'x86-64'
dir = f'obj-opt3-{env["pyver"]}-{host}'
build_dir = Path(kits_dir, utils.KIT_PREFIX_PATT + dir)
cmd = utils.gen_build_cmd(env, xed_builder, '', build_dir, size, flags + ' --assert')
cmd = utils.gen_build_cmd(env, xed_builder, '', build_dir, host, flags + ' --opt=3')
commands.append(cmd)

# enc2test - test encode-decode path of all instructions
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/sanity_external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
#
#END_LEGAL
name: External Sanity

env:
# XED minimal python version requirement
MIN_PY_VER: "3.7.16"

on:
pull_request:
branches:
Expand Down Expand Up @@ -65,3 +70,32 @@ jobs:
cd xed
python3 .github/scripts/sanity_external.py --compiler=${{matrix.compiler}} --version=${{matrix.ver}}
test_min_python_version:
needs: init
runs-on:
- self-hosted
- xed-runners
- Linux
steps:
- name: Checkout xed
uses: actions/checkout@v3
with:
path: xed
- name: Checkout mbuild
uses: actions/checkout@v3
with:
repository: intelxed/mbuild
ref: main
path: mbuild
token: ${{ secrets.PAT }}

- uses: actions/setup-python@v4
with:
python-version: ${{env.MIN_PY_VER}}
- name: Parse python version setup
id: python_ver
run: echo "version=$(python3 --version)" >> $GITHUB_OUTPUT
- name: 'Test ${{ steps.python_ver.outputs.version }}'
run: |
cd xed
python3 .github/scripts/sanity_external.py
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2023.04.16
v2023.06.07
1 change: 1 addition & 0 deletions datafiles/xed-fields.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ SEG_OVD SCALAR xed_bits_t 3 SUPPRESSED NOPRINT INTERNAL DO EO
# 2=DS PREFIX OBSERVED (TAKEN)
# 3=NOT TAKEN HINT VALIDATED for a BRANCH
# 4=TAKEN HINT VALIDATED for a BRANCH
# 5=CET NO-TRACK for Near Indirect CALL/JMP
HINT SCALAR xed_bits_t 3 SUPPRESSED NOPRINT PUBLIC DO EI
# do not do encoder chip checking for the encode request
ENCODE_FORCE SCALAR xed_bits_t 1 SUPPRESSED NOPRINT INTERNAL DO EI
Expand Down
5 changes: 4 additions & 1 deletion datafiles/xed-isa.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#BEGIN_LEGAL
#
#Copyright (c) 2022 Intel Corporation
#Copyright (c) 2023 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -6300,6 +6300,7 @@ IFORM : DEC_GPRv_48
}
{
ICLASS : PUSH
UNAME : PUSH_50
CPL : 3
CATEGORY : PUSH
EXTENSION : BASE
Expand All @@ -6310,6 +6311,7 @@ IFORM : PUSH_GPRv_50
}
{
ICLASS : POP
UNAME : POP_58
CPL : 3
CATEGORY : POP
EXTENSION : BASE
Expand Down Expand Up @@ -7168,6 +7170,7 @@ COMMENT : 2008-06-11 Ignores REX completely. Introduced on PENTIUM4
}
{
ICLASS : NOP
UNAME : NOPF390
CPL : 3
CATEGORY : NOP
EXTENSION : BASE
Expand Down
2 changes: 0 additions & 2 deletions datafiles/xed-state-bits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ W1 REXW=1 SKIP_OSZ=1
W0 REXW=0 SKIP_OSZ=1

norexb_prefix REXB=0
norexx_prefix REXX=0
norexr_prefix REXR=0
############################################################3333
f2_prefix REP=2 # REPNZ, REPNE
f3_prefix REP=3 # REPZ, REPE
Expand Down
9 changes: 5 additions & 4 deletions examples/mfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ def _find_common():
_fatal("Could not find xed_build_common.py")

def setup():
if sys.version_info[0] == 3 and sys.version_info[1] < 6:
_fatal("Need python version 3.6 or later.")
elif sys.version_info[0] == 2 and sys.version_info[1] < 7:
_fatal("Need python version 2.7 or later.")
if sys.version_info[0] == 3:
if sys.version_info[1] < 7:
_fatal("Need python version 3.7 or later.")
else:
_fatal("Need python version 3.7 or later.")
_find_mbuild_import()
# when building in the source tree the xed_build_common.py file is
# in the parent directory of the examples. When building in the
Expand Down

0 comments on commit 4dc7713

Please sign in to comment.