Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 58a9f08f authored by Nicolas Derumigny's avatar Nicolas Derumigny
Browse files

xed-extract: try to update things, probably broke some others

parent cd2ec042
No related branches found
No related tags found
No related merge requests found
Showing with 168 additions and 96 deletions
[submodule "tools/extract-xed-instruction-database/xed"]
path = tools/extract-xed-instruction-database/xed
url = git@github.com:intelxed/xed.git
[submodule "tools/extract-xed-instruction-database/mbuild"]
path = tools/extract-xed-instruction-database/mbuild
url = git@github.com:intelxed/mbuild.git
......@@ -8,9 +8,9 @@ import pipedream.utils.abc as abc
from pipedream.asm import ir
from pipedream.asm.x86.operands import *
from pipedream.asm.x86.registers import *
from pipedream.asm.x86.flags import *
from pipedream.asm.x86.operands import *
from pipedream.asm.x86.registers import *
from pipedream.asm.x86.flags import *
from pipedream.asm.x86 import instructions_xed
__all__ = [
......
......@@ -7,7 +7,7 @@ get_cycles:
push rbx
xor rax, rax
cpuid
rdtsc
rdtsc
shl rdx, 32
or rax, rdx
pop rbx
......
......@@ -25,14 +25,14 @@ ld_vect:
; do 8 parallel loads
; hopefully this is enough to get rid of
; false dependencies
movapd xmm0, [rdi + 8 * rcx]
movapd xmm1, [rdi + 8 * rcx + 16]
movapd xmm2, [rdi + 8 * rcx + 32]
movapd xmm3, [rdi + 8 * rcx + 48]
movapd xmm4, [rdi + 8 * rcx + 64]
movapd xmm5, [rdi + 8 * rcx + 80]
movapd xmm6, [rdi + 8 * rcx + 96]
movapd xmm7, [rdi + 8 * rcx + 112]
movapd xmm0, [rdi + 8 * rcx]
movapd xmm1, [rdi + 8 * rcx + 16]
movapd xmm2, [rdi + 8 * rcx + 32]
movapd xmm3, [rdi + 8 * rcx + 48]
movapd xmm4, [rdi + 8 * rcx + 64]
movapd xmm5, [rdi + 8 * rcx + 80]
movapd xmm6, [rdi + 8 * rcx + 96]
movapd xmm7, [rdi + 8 * rcx + 112]
; each vmov loads 2 words
add rcx, 16
cmp rcx, rsi
......@@ -69,7 +69,7 @@ ld_vect_slw:
; do 4 parallel loads
; hopefully this is enough to get rid of
; false dependencies
movapd xmm0, [rdi + 8 * rcx]
movapd xmm0, [rdi + 8 * rcx]
nop
nop
nop
......
cmake_minimum_required(VERSION 3.1)
project(extract-xed-instruction-database)
find_package(OpenMP)
set(WARNINGS_FLAGS -Wall -Wextra -Werror)
#set(CMAKE_C_COMPILER clang)
#set(CMAKE_CXX_COMPILER clang)
if("${XED_LOCATION}" STREQUAL "")
set(DEFAULT_XED_LOCATION "/usr")
set(DEFAULT_XED_LOCATION "./xed")
message(INFO "Variable 'XED_LOCATION' not specified, using default '${DEFAULT_XED_LOCATION}'")
message("Variable 'XED_LOCATION' not specified, using default '${DEFAULT_XED_LOCATION}'")
set(XED_LOCATION "${DEFAULT_XED_LOCATION}")
endif()
set(XED_LIBRARY "${XED_LOCATION}/lib/libxed.a")
set(XED_INCLUDE_DIRECTORY "${XED_LOCATION}/include")
set(XED_LIBRARY "xed")
set(XED_LIBRARY_DIRECTORY "${XED_LOCATION}/obj")
set(XED_INCLUDE_DIRECTORY "${XED_LOCATION}/obj/wkit/include")
if(NOT EXISTS "${XED_LIBRARY}")
if(NOT EXISTS "${XED_LIBRARY_DIRECTORY}/libxed.a")
message(FATAL_ERROR "Invalid XED_LOCATION ('${XED_LOCATION}'), could not find libxed.a")
endif()
if(NOT IS_DIRECTORY "${XED_INCLUDE_DIRECTORY}")
......@@ -29,6 +33,7 @@ add_executable(extract-xed-instruction-database
utils.cpp utils.hpp
)
target_link_libraries(extract-xed-instruction-database PRIVATE "${XED_LIBRARY}")
target_link_directories(extract-xed-instruction-database PRIVATE "${XED_LIBRARY_DIRECTORY}")
target_include_directories(extract-xed-instruction-database PRIVATE "${XED_INCLUDE_DIRECTORY}")
target_compile_options(extract-xed-instruction-database PRIVATE ${WARNINGS_FLAGS})
......
......@@ -318,6 +318,7 @@ std::set<std::string> Pipedream::tags(XED_Decoded_Instruction inst, const Pipedr
case XED_ATTRIBUTE_MEMORY_FAULT_SUPPRESSION:
case XED_ATTRIBUTE_MMX_EXCEPT:
case XED_ATTRIBUTE_MPX_PREFIX_ABLE:
case XED_ATTRIBUTE_MULTIDEST2:
case XED_ATTRIBUTE_MULTISOURCE4:
break;
case XED_ATTRIBUTE_MXCSR:
......
This diff is collapsed.
......@@ -445,8 +445,8 @@ struct Convert {
operands.push_back(op);
}
return std::move(operands);
auto ret = std::move(operands);
return ret;
}
/// Compute AT&T asm syntax instruction mnemonic from Pipedream_Instruction
......@@ -492,10 +492,8 @@ struct Convert {
case XED_IFORM_MOVZX_GPRv_MEMb: return 'b';
case XED_IFORM_MOVZX_GPRv_MEMw: return 'w';
case XED_IFORM_MOVSXD_GPRv_GPR32: return 'l';
case XED_IFORM_MOVSXD_GPRv_MEMd: return 'l';
default: abort();
case XED_IFORM_MOVSXD_GPRv_GPRz: return 'l';
case XED_IFORM_MOVSXD_GPRv_MEMz: return 'l';
}
}();
......@@ -504,7 +502,6 @@ struct Convert {
case Pipedream::I16: return 'w';
case Pipedream::I32: return 'l';
case Pipedream::I64: return 'q';
default: abort();
}
}();
......@@ -665,9 +662,9 @@ struct Convert {
case XED_ICLASS_PF2IW:
case XED_ICLASS_PFACC:
case XED_ICLASS_PFADD:
case XED_ICLASS_PFECMPEQ:
case XED_ICLASS_PFECMPGE:
case XED_ICLASS_PFECMPGT:
case XED_ICLASS_PFCMPEQ:
case XED_ICLASS_PFCMPGE:
case XED_ICLASS_PFCMPGT:
case XED_ICLASS_PHADDD:
case XED_ICLASS_PHADDSW:
case XED_ICLASS_PHADDW:
......
Subproject commit 5304b94361fccd830c0e2417535a866b79c1c297
......@@ -19,9 +19,9 @@ template<typename T>
struct Span {
using const_iterator = const T*;
Span() : _size{0}, _data{0} {}
constexpr Span() : _size{0}, _data{0} {}
constexpr Span(const std::initializer_list<T> v) : _size{v.size()}, _data{v.begin()} {}
constexpr Span(const std::initializer_list<const T> v) : _size{v.size()}, _data{v.begin()} {}
Span(const std::vector<T> &v) : _size{v.size()}, _data{v.data()} {}
......
Subproject commit afbb851b5f2f2ac6cdb6e6d9bebbaf2d4e77286d
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment