Commit d8523fbe authored by Cédric VALENSI's avatar Cédric VALENSI

Sync

parent 485b1869
......@@ -318,7 +318,7 @@ find_path(RPMBUILD_PATH NAMES rpmbuild) # look for rpmbuild
find_path(DPKG_DEB_PATH NAMES dpkg-deb) # look for dpkg-deb
SET(CPACK_PACKAGE_VERSION_MAJOR "2")
SET(CPACK_PACKAGE_VERSION_MINOR "7")
SET(CPACK_PACKAGE_VERSION_MINOR "8")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
# ---- Check if at least one package generator has been found
......@@ -456,6 +456,8 @@ ADD_CUSTOM_TARGET(distclean DEPENDS
distclean_maqao distclean_libtroll distclean_libdwarf
# MAQAO Lua API
${DISTCLEAN_LUA} distclean_builtin distclean_abstractobjects distclean_crosscompil
# MAQAO modules
distclean_oneview
# MAQAO doc
distclean_doc
COMMAND ${CMAKE_COMMAND} -E remove_directory ${LIBRARY_OUTPUT_PATH}
......
......@@ -32,10 +32,10 @@ if (${IS_DOXYGEN})
ADD_CUSTOM_TARGET (doc_doxygen
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/internals/CoreDeveloperGuide.html ${CMAKE_CURRENT_SOURCE_DIR}/
COMMAND ${DOXYGEN_BIN} ${CMAKE_CURRENT_SOURCE_DIR}/internals/Doxyfile
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/html ${CMAKE_CURRENT_SOURCE_DIR}/internals/html
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_SOURCE_DIR}/html
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/latex ${CMAKE_CURRENT_SOURCE_DIR}/internals/latex
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_SOURCE_DIR}/latex
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/html ${CMAKE_CURRENT_SOURCE_DIR}/internals/html
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_BINARY_DIR}/html
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/latex ${CMAKE_CURRENT_SOURCE_DIR}/internals/latex
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_BINARY_DIR}/latex
)
ADD_DEPENDENCIES (doc doc_doxygen)
endif (${IS_DOXYGEN})
......
.\" File generated using by MAQAO.
.TH MAQAO-ANALYZE "1" "2019/01/23" "MAQAO-ANALYZE 2.7.0" "User Commands"
.TH MAQAO-ANALYZE "1" "2019/04/05" "MAQAO-ANALYZE 2.8.0" "User Commands"
.SH NAME
maqao-analyze \- manual page for maqao analyze module.
.SH SYNOPSIS
......
.\" File generated using by MAQAO.
.TH MAQAO-MADRAS "1" "2019/01/23" "MAQAO-MADRAS 2.7.0" "User Commands"
.TH MAQAO-MADRAS "1" "2019/04/05" "MAQAO-MADRAS 2.8.0" "User Commands"
.SH NAME
maqao-madras \- manual page for maqao madras module.
.SH SYNOPSIS
......
.\" File generated using by MAQAO.
.TH MAQAO "1" "2019/01/23" "MAQAO 2.7.0" "User Commands"
.TH MAQAO "1" "2019/04/05" "MAQAO 2.8.0" "User Commands"
.SH NAME
maqao \- manual page for maqao module.
.SH SYNOPSIS
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -86,7 +86,7 @@ void loop_free(void* p)
* \param l a loop
* \return l id or 0 if l is NULL
*/
unsigned int loop_get_id(loop_t* l)
unsigned int loop_get_id(const loop_t* l)
{
return (l != NULL) ? l->global_id : 0;
}
......@@ -96,7 +96,7 @@ unsigned int loop_get_id(loop_t* l)
* \param l a loop
* \return a list of entries or PTR_ERROR if l is NULL
*/
list_t* loop_get_entries(loop_t* l)
list_t* loop_get_entries(const loop_t* l)
{
return (l != NULL) ? l->entries : PTR_ERROR;
}
......@@ -106,7 +106,7 @@ list_t* loop_get_entries(loop_t* l)
* \param l a loop
* \return a list of exits or PTR_ERROR if l is NULL
*/
list_t* loop_get_exits(loop_t* l)
list_t* loop_get_exits(const loop_t* l)
{
return (l != NULL) ? l->exits : PTR_ERROR;
}
......@@ -116,7 +116,7 @@ list_t* loop_get_exits(loop_t* l)
* \param l a loop
* \return a list of block or PTR_ERROR if l is NULL
*/
queue_t* loop_get_blocks(loop_t* l)
queue_t* loop_get_blocks(const loop_t* l)
{
return (l != NULL) ? l->blocks : PTR_ERROR;
}
......@@ -126,7 +126,7 @@ queue_t* loop_get_blocks(loop_t* l)
* \param l a loop
* \return the number of blocks
*/
int loop_get_nb_blocks(loop_t* l)
int loop_get_nb_blocks(const loop_t* l)
{
return queue_length(loop_get_blocks(l));
}
......@@ -136,7 +136,7 @@ int loop_get_nb_blocks(loop_t* l)
* \param l a loop
* \return the number of blocks
*/
int loop_get_nb_blocks_novirtual(loop_t* l)
int loop_get_nb_blocks_novirtual(const loop_t* l)
{
int nb = 0;
......@@ -154,7 +154,7 @@ int loop_get_nb_blocks_novirtual(loop_t* l)
* \param l a loop
* \return a queue of paths or PTR_ERROR if l is NULL
*/
queue_t* loop_get_paths(loop_t* l)
queue_t* loop_get_paths(const loop_t* l)
{
return (l != NULL) ? l->paths : PTR_ERROR;
}
......@@ -164,7 +164,7 @@ queue_t* loop_get_paths(loop_t* l)
* \param l a loop
* \return a list of groups or PTR_ERROR if l is NULL
*/
list_t* loop_get_groups(loop_t* l)
list_t* loop_get_groups(const loop_t* l)
{
return (l != NULL) ? l->groups : PTR_ERROR;
}
......@@ -174,7 +174,7 @@ list_t* loop_get_groups(loop_t* l)
* \param l a loop
* \return a function or PTR_ERROR if l is NULL
*/
fct_t* loop_get_fct(loop_t* l)
fct_t* loop_get_fct(const loop_t* l)
{
return (l != NULL) ? l->function : PTR_ERROR;
}
......@@ -184,7 +184,7 @@ fct_t* loop_get_fct(loop_t* l)
* \param l a loop
* \return an asmfile or PTR_ERROR if l is NULL
*/
asmfile_t* loop_get_asmfile(loop_t* l)
asmfile_t* loop_get_asmfile(const loop_t* l)
{
fct_t *function = loop_get_fct(l);
return fct_get_asmfile(function);
......@@ -195,7 +195,7 @@ asmfile_t* loop_get_asmfile(loop_t* l)
* \param l a loop
* \return a project or PTR_ERROR if l is NULL
*/
project_t* loop_get_project(loop_t* l)
project_t* loop_get_project(const loop_t* l)
{
asmfile_t *asmfile = loop_get_asmfile(l);
return asmfile_get_project(asmfile);
......@@ -206,7 +206,7 @@ project_t* loop_get_project(loop_t* l)
* \param l a loop
* \return a hierarchy node (tree_t*) or PTR_ERROR if l is NULL
*/
tree_t* loop_get_hierarchy_node(loop_t* l)
tree_t* loop_get_hierarchy_node(const loop_t* l)
{
return (l != NULL) ? l->hierarchy_node : PTR_ERROR;
}
......@@ -216,7 +216,7 @@ tree_t* loop_get_hierarchy_node(loop_t* l)
* \param l a loop
* \return a parent node (tree_t*) or PTR_ERROR if l or loop_get_hierarchy_node (l) is NULL
*/
tree_t* loop_get_parent_node(loop_t* l)
tree_t* loop_get_parent_node(const loop_t* l)
{
tree_t *hnode = loop_get_hierarchy_node(l);
......@@ -228,7 +228,7 @@ tree_t* loop_get_parent_node(loop_t* l)
* \param l a loop
* \return a children node (tree_t*) or PTR_ERROR if l or loop_get_hierarchy_node (l) is NULL
*/
tree_t* loop_get_children_node(loop_t* l)
tree_t* loop_get_children_node(const loop_t* l)
{
tree_t *hnode = loop_get_hierarchy_node(l);
......@@ -271,7 +271,7 @@ int loop_get_nb_insns(loop_t* l)
* \param loop a loop
* \return boolean
*/
int loop_is_innermost(loop_t *loop)
int loop_is_innermost(const loop_t *loop)
{
if (loop == NULL)
return FALSE;
......@@ -287,9 +287,9 @@ int loop_is_innermost(loop_t *loop)
return (children_node == NULL) ? TRUE : FALSE;
}
static int _rec_depth(loop_t *loop, int depth)
static int _rec_depth(const loop_t *loop, int depth)
{
loop_t *parent_loop = tree_getdata(loop_get_parent_node(loop));
const loop_t *parent_loop = tree_getdata(loop_get_parent_node(loop));
return (parent_loop != NULL) ? _rec_depth(parent_loop, depth + 1) : depth;
}
......@@ -299,7 +299,7 @@ static int _rec_depth(loop_t *loop, int depth)
* \param loop a loop
* \return depth or SIGNED_ERROR if failure
*/
int loop_get_depth(loop_t *loop)
int loop_get_depth(const loop_t *loop)
{
if (loop == NULL)
return SIGNED_ERROR;
......@@ -313,7 +313,7 @@ int loop_get_depth(loop_t *loop)
* \param loop a loop
* \return queue of CFG edges
*/
queue_t *loop_get_backedges (loop_t *loop)
queue_t *loop_get_backedges (const loop_t *loop)
{
queue_t *new = queue_new();
......@@ -342,7 +342,7 @@ queue_t *loop_get_backedges (loop_t *loop)
* \param loop a loop
* \return queue of instructions
*/
queue_t *loop_get_backedge_insns (loop_t *loop)
queue_t *loop_get_backedge_insns (const loop_t *loop)
{
queue_t *new = queue_new();
......@@ -363,7 +363,7 @@ queue_t *loop_get_backedge_insns (loop_t *loop)
/*
* Returns the first backedge instruction of a loop
*/
static insn_t *loop_get_first_backedge_insn (loop_t *loop)
static insn_t *loop_get_first_backedge_insn (const loop_t *loop)
{
queue_t *backedge_insns = loop_get_backedge_insns (loop);
insn_t *first_insn = queue_peek_head (backedge_insns);
......@@ -379,7 +379,7 @@ static insn_t *loop_get_first_backedge_insn (loop_t *loop)
* \param loop a loop
* \return path to source file (string)
*/
char *loop_get_src_file_path (loop_t *loop)
char *loop_get_src_file_path (const loop_t *loop)
{
insn_t *first_insn = loop_get_first_backedge_insn (loop);
......@@ -393,7 +393,7 @@ char *loop_get_src_file_path (loop_t *loop)
* \param min pointer to first line rank
* \param max pointer to last line rank
*/
void loop_get_src_lines (loop_t *loop, unsigned *min, unsigned *max)
void loop_get_src_lines (const loop_t *loop, unsigned *min, unsigned *max)
{
*min = 0;
*max = 0;
......@@ -423,7 +423,7 @@ void loop_get_src_lines (loop_t *loop, unsigned *min, unsigned *max)
* Returns source regions for a loop
* \see blocks_get_src_regions
*/
queue_t *loop_get_src_regions (loop_t *loop)
queue_t *loop_get_src_regions (const loop_t *loop)
{
return blocks_get_src_regions (loop_get_blocks (loop));
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -138,7 +138,7 @@ uarch_t x86_64_uarch_westmere;
/**\note (2016-11-21) Values are based on code present in plugins/built_in/abstract_objects/insn/ia32_x86_64/type.lua and Intel Optimisation manual*/
uint8_t x86_64_isets_westmere[] = { ISET_8086, ISET_8087, ISET_MMX, ISET_SSE,
ISET_SSE2, ISET_SSE3, ISET_SSSE3, ISET_SSE4_1, ISET_SSE4_2, ISET_AES,
ISET_CLMUL };
ISET_PCLMULQDQ };
/**\note (2016-11-17) Assuming here that all processors share the same list of instruction sets. If some processor have different lists of supported
* instruction sets (which was the purpose of implementing the processor granularity), create a different array and reference it in the appropriate
* declaration of the processor. Use a name with the following format: x86_64_isets_<uarch>_id<procid> (procid is the id of the first proc in the list
......@@ -173,7 +173,7 @@ uarch_t x86_64_uarch_sandy_bridge;
/**\note (2016-11-21) Values are based on code present in plugins/built_in/abstract_objects/insn/ia32_x86_64/type.lua and Intel Optimisation manual*/
uint8_t x86_64_isets_sandy_bridge[] = { ISET_8086, ISET_8087, ISET_MMX, ISET_SSE,
ISET_SSE2, ISET_SSE3, ISET_SSSE3, ISET_SSE4_1, ISET_SSE4_2, ISET_AES,
ISET_CLMUL, ISET_AVX, ISET_AES_AVX, ISET_CLMUL_AVX, ISET_XSAVEOPT,
ISET_PCLMULQDQ, ISET_AVX, ISET_AES_AVX, ISET_PCLMULQDQ_AVX, ISET_XSAVEOPT,
ISET_SMX };
/**\note (2016-11-17) Assuming here that all processors share the same list of instruction sets. If some processor have different lists of supported
* instruction sets (which was the purpose of implementing the processor granularity), create a different array and reference it in the appropriate
......@@ -206,7 +206,7 @@ uarch_t x86_64_uarch_ivy_bridge;
/**\note (2016-11-21) Values are based on code present in plugins/built_in/abstract_objects/insn/ia32_x86_64/type.lua and Intel Optimisation manual*/
uint8_t x86_64_isets_ivy_bridge[] = { ISET_8086, ISET_8087, ISET_MMX, ISET_SSE,
ISET_SSE2, ISET_SSE3, ISET_SSSE3, ISET_SSE4_1, ISET_SSE4_2, ISET_AES,
ISET_CLMUL, ISET_AVX, ISET_AES_AVX, ISET_CLMUL_AVX, ISET_XSAVEOPT,
ISET_PCLMULQDQ, ISET_AVX, ISET_AES_AVX, ISET_PCLMULQDQ_AVX, ISET_XSAVEOPT,
ISET_SMX, ISET_F16C, ISET_RDRAND, ISET_FSGSBASE };
/**\note (2016-11-17) Assuming here that all processors share the same list of instruction sets. If some processor have different lists of supported
* instruction sets (which was the purpose of implementing the processor granularity), create a different array and reference it in the appropriate
......@@ -236,7 +236,7 @@ uarch_t x86_64_uarch_ivy_bridge_e;
/**\todo (2016-11-17) Update this list! Values are based on code present in plugins/built_in/abstract_objects/insn/ia32_x86_64/type.lua for Ivy Bridge*/
uint8_t x86_64_isets_ivy_bridge_e[] = { ISET_8086, ISET_8087, ISET_MMX, ISET_SSE,
ISET_SSE2, ISET_SSE3, ISET_SSSE3, ISET_SSE4_1, ISET_SSE4_2, ISET_AES,
ISET_CLMUL, ISET_AVX, ISET_AES_AVX, ISET_CLMUL_AVX, ISET_XSAVEOPT,
ISET_PCLMULQDQ, ISET_AVX, ISET_AES_AVX, ISET_PCLMULQDQ_AVX, ISET_XSAVEOPT,
ISET_SMX, ISET_F16C, ISET_RDRAND, ISET_FSGSBASE };
/**\note (2016-11-17) Assuming here that all processors share the same list of instruction sets. If some processor have different lists of supported
* instruction sets (which was the purpose of implementing the processor granularity), create a different array and reference it in the appropriate
......@@ -267,7 +267,7 @@ uarch_t x86_64_uarch_haswell;
/**\todo (2016-11-21) Add the TSX instruction set to the list once the corresponding instructions have been added*/
uint8_t x86_64_isets_haswell[] = { ISET_8086, ISET_8087, ISET_MMX, ISET_SSE,
ISET_SSE2, ISET_SSE3, ISET_SSSE3, ISET_SSE4_1, ISET_SSE4_2, ISET_AES,
ISET_CLMUL, ISET_AVX, ISET_AES_AVX, ISET_CLMUL_AVX, ISET_XSAVEOPT,
ISET_PCLMULQDQ, ISET_AVX, ISET_AES_AVX, ISET_PCLMULQDQ_AVX, ISET_XSAVEOPT,
ISET_SMX, ISET_F16C, ISET_RDRAND, ISET_FSGSBASE, ISET_AVX2, ISET_BMI1,
ISET_BMI2, ISET_FMA, ISET_RTM, ISET_INVPCID /*,ISET_TSX*/ };
/**\note (2016-11-17) Assuming here that all processors share the same list of instruction sets. If some processor have different lists of supported
......@@ -305,7 +305,7 @@ uarch_t x86_64_uarch_broadwell;
/**\todo (2016-11-21) Add the TSX instruction set to the list once the corresponding instructions have been added*/
uint8_t x86_64_isets_broadwell[] = { ISET_8086, ISET_8087, ISET_MMX, ISET_SSE,
ISET_SSE2, ISET_SSE3, ISET_SSSE3, ISET_SSE4_1, ISET_SSE4_2, ISET_AES,
ISET_CLMUL, ISET_AVX, ISET_AES_AVX, ISET_CLMUL_AVX, ISET_XSAVEOPT,
ISET_PCLMULQDQ, ISET_AVX, ISET_AES_AVX, ISET_PCLMULQDQ_AVX, ISET_XSAVEOPT,
ISET_SMX, ISET_F16C, ISET_RDRAND, ISET_FSGSBASE, ISET_AVX2, ISET_BMI1,
ISET_BMI2, ISET_FMA, ISET_RTM, ISET_INVPCID, ISET_ADX, ISET_RDSEED /*,ISET_TSX*/ };
/**\note (2016-11-17) Assuming here that all processors share the same list of instruction sets. If some processor have different lists of supported
......@@ -346,12 +346,12 @@ uarch_t x86_64_uarch_skylake;
/**\todo (2016-11-21) Add the TSX, CLFLUSHOPT and MPX instruction sets to the list once the corresponding instructions have been added*/
uint8_t x86_64_isets_skylake[] = { ISET_8086, ISET_8087, ISET_MMX, ISET_SSE,
ISET_SSE2, ISET_SSE3, ISET_SSSE3, ISET_SSE4_1, ISET_SSE4_2, ISET_AES,
ISET_CLMUL, ISET_AVX, ISET_AES_AVX, ISET_CLMUL_AVX, ISET_XSAVEOPT,
ISET_PCLMULQDQ, ISET_AVX, ISET_AES_AVX, ISET_PCLMULQDQ_AVX, ISET_XSAVEOPT,
ISET_SMX, ISET_F16C, ISET_RDRAND, ISET_FSGSBASE, ISET_AVX2, ISET_BMI1,
ISET_BMI2, ISET_FMA, ISET_RTM, ISET_INVPCID, ISET_ADX, ISET_RDSEED /*, ISET_TSX, ISET_CLFLUSHOPT, ISET_MPX*/ };
uint8_t x86_64_isets_skylake_avx512[] = { ISET_8086, ISET_8087, ISET_MMX, ISET_SSE,
ISET_SSE2, ISET_SSE3, ISET_SSSE3, ISET_SSE4_1, ISET_SSE4_2, ISET_AES,
ISET_CLMUL, ISET_AVX, ISET_AES_AVX, ISET_CLMUL_AVX, ISET_XSAVEOPT,
ISET_PCLMULQDQ, ISET_AVX, ISET_AES_AVX, ISET_PCLMULQDQ_AVX, ISET_XSAVEOPT,
ISET_SMX, ISET_F16C, ISET_RDRAND, ISET_FSGSBASE, ISET_AVX2, ISET_BMI1,
ISET_BMI2, ISET_FMA, ISET_RTM, ISET_INVPCID, ISET_ADX, ISET_RDSEED, /*, ISET_TSX, ISET_CLFLUSHOPT, ISET_MPX*/
ISET_AVX512F, ISET_AVX512BW, ISET_AVX512DQ, ISET_AVX512CD
......@@ -391,7 +391,7 @@ uarch_t x86_64_uarch_haswell_e;
/**\todo (2016-11-21) Add the TSX instruction set to the list once the corresponding instructions have been added*/
uint8_t x86_64_isets_haswell_e[] = { ISET_8086, ISET_8087, ISET_MMX, ISET_SSE,
ISET_SSE2, ISET_SSE3, ISET_SSSE3, ISET_SSE4_1, ISET_SSE4_2, ISET_AES,
ISET_CLMUL, ISET_AVX, ISET_AES_AVX, ISET_CLMUL_AVX, ISET_XSAVEOPT,
ISET_PCLMULQDQ, ISET_AVX, ISET_AES_AVX, ISET_PCLMULQDQ_AVX, ISET_XSAVEOPT,
ISET_SMX, ISET_F16C, ISET_RDRAND, ISET_FSGSBASE, ISET_AVX2, ISET_BMI1,
ISET_BMI2, ISET_FMA, ISET_RTM, ISET_INVPCID /*,ISET_TSX*/ };
/**\note (2016-11-17) Assuming here that all processors share the same list of instruction sets. If some processor have different lists of supported
......@@ -423,7 +423,7 @@ uarch_t x86_64_uarch_knights_landing;
/**\todo (2016-11-21) Add the CLFLUSHOPT to the list once the corresponding instruction has been added*/
uint8_t x86_64_isets_knights_landing[] = { ISET_8086, ISET_8087, ISET_MMX, ISET_SSE,
ISET_SSE2, ISET_SSE3, ISET_SSSE3, ISET_SSE4_1, ISET_SSE4_2, ISET_AES,
ISET_CLMUL, ISET_AVX, ISET_AES_AVX, ISET_CLMUL_AVX, ISET_XSAVEOPT,
ISET_PCLMULQDQ, ISET_AVX, ISET_AES_AVX, ISET_PCLMULQDQ_AVX, ISET_XSAVEOPT,
ISET_SMX, ISET_F16C, ISET_RDRAND, ISET_FSGSBASE, ISET_AVX2, ISET_BMI1,
ISET_BMI2, ISET_FMA, ISET_RTM, ISET_INVPCID, ISET_ADX, ISET_RDSEED,
ISET_AVX512CD, ISET_AVX512ER, ISET_AVX512F,
......@@ -457,7 +457,7 @@ uarch_t x86_64_uarch_kaby_lake;
/**\todo (2016-11-24) Add the TSX, CLFLUSHOPT and MPX instruction sets to the list once the corresponding instructions have been added*/
uint8_t x86_64_isets_kaby_lake[] = { ISET_8086, ISET_8087, ISET_MMX, ISET_SSE,
ISET_SSE2, ISET_SSE3, ISET_SSSE3, ISET_SSE4_1, ISET_SSE4_2, ISET_AES,
ISET_CLMUL, ISET_AVX, ISET_AES_AVX, ISET_CLMUL_AVX, ISET_XSAVEOPT,
ISET_PCLMULQDQ, ISET_AVX, ISET_AES_AVX, ISET_PCLMULQDQ_AVX, ISET_XSAVEOPT,
ISET_SMX, ISET_F16C, ISET_RDRAND, ISET_FSGSBASE, ISET_AVX2, ISET_BMI1,
ISET_BMI2, ISET_FMA, ISET_RTM, ISET_INVPCID, ISET_ADX, ISET_RDSEED /*, ISET_TSX, ISET_CLFLUSHOPT, ISET_MPX*/ };
/**\note (2016-11-17) Assuming here that all processors share the same list of instruction sets. If some processor have different lists of supported
......@@ -717,7 +717,7 @@ uarch_t *x86_64_uarchs[x86_64_UARCH_MAX] = {
* \note This function is not intended to be invoked directly, but from \ref arch_get_uarch_default_proc
* As such, it does not need to check that its parameters are valid
* */
proc_t* x86_64_uarch_get_default_proc(uarch_t* uarch) {
proc_t* x86_64_uarch_get_default_proc(const uarch_t* uarch) {
/**\todo (2016-11-21) Update as needed. Use something like:
* switch(uarch_get_id(uarch) {
* case x86_64_UARCH_xxx:
......
......@@ -103,7 +103,7 @@ void *array_remove(array_t *array)
* \param pos rank of the element to get
* \return nth element
*/
void *array_get_elt_at_pos(const array_t *array, int pos)
void *array_get_elt_at_pos(const array_t *array, unsigned pos)
{
if (!array || pos >= array->length) return NULL;
......@@ -140,7 +140,7 @@ void *array_get_last_elt(const array_t *array)
* \param pos rank of the element to set
* \param data data to set
*/
void array_set_elt_at_pos(array_t *array, int pos, const void *data)
void array_set_elt_at_pos(array_t *array, unsigned pos, const void *data)
{
if (!array || pos >= array->length) return;
......@@ -296,7 +296,7 @@ void array_append (array_t *a1, const array_t *a2)
if (l1 == 0 || l2 == 0) return;
const int new_l1 = l1 + l2;
const unsigned new_l1 = l1 + l2;
if (a1->max_length < new_l1) {
a1->mem = lc_realloc (a1->mem,
new_l1 * sizeof *(a1->mem));
......
......@@ -1379,7 +1379,7 @@ static int txtfile_parse_field(txtfile_t* tf, txtscn_t* ts,
&& character_isblankspace(*endfield) == FALSE)
endfield++;
}
if (endfield == '\0')
if (*endfield == '\0')
return ERR_COMMON_TXTFILE_FIELD_ENDING_NOT_FOUND;
if (endfield == tf->cursor && template->optional == FALSE)
return ERR_COMMON_TXTFILE_MISSING_MANDATORY_FIELD;
......
......@@ -398,7 +398,7 @@ static int __is_debug_activated_for_this_file __attribute__((unused)) = -1;
* */
#define QUEUE_TO_ARRAY(T,Q,A,N) T A[queue_length(Q)];N=0;{FOREACH_INQUEUE(Q,expiter) {\
A[N++] = GET_DATA_T(T,expiter);};}\
assert(N==queue_length(Q));
assert(N==(unsigned)queue_length(Q));
/** Macro for exporting the content of a queue to an array allocated on the heap
* \param T Type of the data stored in the queue
......@@ -2075,9 +2075,9 @@ struct hashtable_s {
* Y: name of an iterator (not already used)
*/
#define FOREACH_INHASHTABLE(X,Y)\
hashnode_t *Y; hashtable_size_t __i;\
for (__i = 0; __i < X->size; __i++)\
for (Y = X->nodes[__i]; Y != NULL; Y = Y->next)
hashnode_t *Y; hashtable_size_t __i_##Y;\
for (__i_##Y = 0; __i_##Y < X->size; __i_##Y++)\
for (Y = X->nodes[__i_##Y]; Y != NULL; Y = Y->next)
/**
* Macro used to traverse hashtable elements matching a given key
......@@ -2429,7 +2429,7 @@ extern void *array_remove(array_t *array);
* \param pos rank of the element to get
* \return nth element
*/
extern void *array_get_elt_at_pos(const array_t *array, int pos);
extern void *array_get_elt_at_pos(const array_t *array, unsigned pos);
/**
* Returns the first element in an array
......@@ -2452,7 +2452,7 @@ extern void *array_get_last_elt(const array_t *array);
* \param pos rank of the element to set
* \param data data to set
*/
extern void array_set_elt_at_pos(array_t *array, int pos, const void *data);
extern void array_set_elt_at_pos(array_t *array, unsigned pos, const void *data);
/**
* Returns the length of a array
......
......@@ -22,7 +22,7 @@
/**
* \file x86_64_assembler.c
* \brief This file contains the definition of the function for assembling an instruction
* \warning This file has been automatically generated by MINJAG from file x86_64_f9b004e4758eb6261f80b818468dc14a.bdf and should not be modified
* \warning This file has been automatically generated by MINJAG from file x86_64_b27e02b7d49e9fc0fcf029e33fa2e49b.bdf and should not be modified
* */
#include "x86_64_assembler.h"
#include "x86_64_arch.h"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -22,7 +22,7 @@
/**
* \file x86_64_sym.h
* \brief This file contains useful macro definitions for the grammar symbols
* \warning This file has been automatically generated by MINJAG from file x86_64_f9b004e4758eb6261f80b818468dc14a.bdf and should not be modified
* \warning This file has been automatically generated by MINJAG from file x86_64_b27e02b7d49e9fc0fcf029e33fa2e49b.bdf and should not be modified
* */
#ifndef X86_64_SYM_H_
#define X86_64_SYM_H_
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -22,7 +22,7 @@
/**
* \file x86_64_fsm.c
* \brief This file contains the declaration of the function loading the variables used for running the FSM
* \warning This file has been automatically generated by MINJAG from file x86_64_f9b004e4758eb6261f80b818468dc14a.bdf and should not be modified
* \warning This file has been automatically generated by MINJAG from file x86_64_b27e02b7d49e9fc0fcf029e33fa2e49b.bdf and should not be modified
* */
#include "x86_64_fsm.h"
#include "x86_64_arch.h"
......
This diff is collapsed.
......@@ -22,7 +22,7 @@
/**
* \file x86_64_sym.h
* \brief This file contains useful macro definitions for the grammar symbols
* \warning This file has been automatically generated by MINJAG from file x86_64_f9b004e4758eb6261f80b818468dc14a.bdf and should not be modified
* \warning This file has been automatically generated by MINJAG from file x86_64_b27e02b7d49e9fc0fcf029e33fa2e49b.bdf and should not be modified
* */
#ifndef X86_64_SYM_H_
#define X86_64_SYM_H_
......
This diff is collapsed.
This diff is collapsed.
......@@ -829,7 +829,7 @@ static void _dwarf_memloc_set_arch_reg(DwarfAPI* api, DwarfMemLoc* memloc,
break;
#endif
#ifdef _ARCHDEF_k1om
case EM_K1OM:
case EM_K10M:
k1om__dwarf_memloc_set_arch_reg (api, memloc, index);
break;
#endif
......
This diff is collapsed.
......@@ -470,7 +470,7 @@ static const char* tostring_e_machine(int code)
case EM_XTENSA:
return ("Tensilica Xtensa Architecture");
break;
case EM_K1OM:
case EM_K10M:
return ("Intel Many Integrated Core Architecture");
break;
default:
......
......@@ -2999,7 +2999,7 @@ int64_t elfexe_add_jmprel(elffile_t* efile,char* symname,int* relidx)
relotype=R_X86_64_JUMP_SLOT;
addend=0;
break;
case EM_K1OM:
case EM_K10M:
nextaddr = lastaddr+8;
relotype=R_X86_64_JUMP_SLOT;
addend=0;
......@@ -6533,6 +6533,8 @@ static int asmfile_add_debug_labels (asmfile_t* asmfile, hashtable_t* lbls_by_ad
if ( low_pc_addr != -1)
{
label_t* label = hashtable_lookup(lbls_by_addr, low_pc_addr);
DBGMSG("Label %sfound at address %#"PRIx64" in file %s%s%s\n",
label?"":"not ", low_pc_addr, asmfile_get_name(asmfile), label?": ":"", label?label_get_name(label):"");
//LABEL IS ALREADY PRESENT IN THE LIST (FROM .symtab)
if (label!= NULL)
{
......
......@@ -45,7 +45,7 @@
* If the architecture is not supported under this binary format, the entry must be left empty
*/
#ifdef _ARCHDEF_k1om
ARCH_AND_CODES(k1om, EM_K1OM)
ARCH_AND_CODES(k1om, EM_K10M)
#endif
#ifdef _ARCHDEF_x86_64
ARCH_AND_CODES(x86_64, EM_X86_64)
......
......@@ -80,6 +80,7 @@ ADD_CUSTOM_TARGET(distclean_maqao DEPENDS distclean_maqao_LuaConsts
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_SOURCE_DIR}/load_images.lua
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_SOURCE_DIR}/lua_static.lua
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_SOURCE_DIR}/errs2Lua.lua
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_SOURCE_DIR}/src/plugins/images_db.lua
VERBATIM
)
......@@ -903,7 +903,7 @@ static void update_loop_block_ids(asmfile_t* asmfile, txtfile_t* txtfile,
txtfield_t* field_loop_id = txtscn_getfield(loops[i],
fieldnames->loopfieldnames[LOOPF_ID]);
//Retrieves the value stored in the field
int loop_id = txtfield_getnum(field_loop_id);
uint32_t loop_id = txtfield_getnum(field_loop_id);
if (loop_id > max_loopid)
max_loopid = loop_id; //Tracking the highest loop id
//Retrieves in the section the field list whose name is defined in fieldnames->loopfieldnames[LOOPF_BLOCKS]
......
This diff is collapsed.
This diff is collapsed.
......@@ -728,7 +728,7 @@ function HTML:_html_display_bar_and_line_chart (file, hchart)
end
if hchart.header.no_html ~= true then
file:write ("<div style=\"margin: 10px; overflow-x:"..(hchart.header.overflow_x or "auto").."; overflow-y:hidden;\"><div id=\"chart_cat_"..hchart._id.."\" style=\"height:"..(hchart.header.height or "500").."px;\" ></div></div>\n")
file:write ("<div style=\"margin: 10px; overflow-x:"..(hchart.header.overflow_x or "auto").."; overflow-y:hidden;\"><div id=\"chart_cat_"..hchart._id.."\" style=\"height:"..(hchart.header.height or "500").."px;margin-top:20px;\" ></div></div>\n")
file:write ("<script class=\"code\" >\n")
end
if hchart.header.no_javascript ~= true then
......
......@@ -171,7 +171,7 @@ function Utils:get_args(cmd_line_args)
local tmp = string.gsub (args["_bin_params"], "^%s*", "")
args["bin"] = string.gsub (tmp, "%s.*", "")
local tmp2 = string.gsub (args["bin"], "%-", "%%%-")
args["_bin_params"] = string.gsub (tmp, tmp2, "")
args["_bin_params"] = string.gsub (tmp, "^"..tmp2, "")
--[[
local tokens = String:split (args["_bin_params"], " ")
local new_bin_params = ""
......
......@@ -151,16 +151,22 @@ static int l_read_dir (lua_State * L)
return 1; /* table is already on top */
}
/* E. Oseret 2019/02/22: this function has several bugs, is not really portable
* and should be removed (or heavily tested and improved if good reason to).
* Use LUA file:read() instead */
static int l_read_file (lua_State * L)
{
DBGMSG0 ("fs.readfile() is deprecated and does not behave correctly on some OS / file systems. Use file:read() instead\n.");
char *buffer;
const char *filename = luaL_checkstring (L, 1);
int fd;
struct stat st;
// E. Oseret 2019/02/22: stat is UNIX specific. Should be _stat on Windows
if (!stat (filename, &st))
{
// E. Oseret 2019/02/22: why not use fopen/fread/fclose (portable) ?
#ifdef _WIN32
fd = _open(filename, _O_RDONLY);
#else
......@@ -168,7 +174,12 @@ static int l_read_file (lua_State * L)
#endif
if (fd < 0)
return 0;
/* E. Oseret 2019/02/22: st.st_size = 0 on some OS / file systems (WSL, maybe NFS...).
* On another ones, st.st_size = allocated size (multiple of block size) >= size.
* Another method should be used like ftell. */
buffer = (char *) malloc (st.st_size);
memset (buffer, 0, st.st_size); // Added by E. Oseret 2019/02/22 (to fix size < st_size)
#ifdef _WIN32
if (_read (fd, buffer, st.st_size) < 0)
#else
......@@ -176,7 +187,7 @@ static int l_read_file (lua_State * L)
#endif
{
free (buffer);
fprintf (stderr, "error");
perror ("read");
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment