Compare commits

..

1 Commits

Author SHA1 Message Date
jia xiang
0d06e428a0
Merge d9325b2549 into 9773390537 2025-05-05 02:47:12 +00:00
10 changed files with 20 additions and 58 deletions

View File

@ -53,7 +53,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3.28.17
uses: github/codeql-action/init@v3.28.15
with:
languages: ${{ matrix.language }}
@ -70,7 +70,7 @@ jobs:
- run: |
./.github/scripts/codeql_buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3.28.17
uses: github/codeql-action/analyze@v3.28.15
with:
category: "/language:${{matrix.language}}"
upload: false
@ -99,7 +99,7 @@ jobs:
output: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
- name: Upload CodeQL results to code scanning
uses: github/codeql-action/upload-sarif@v3.28.17
uses: github/codeql-action/upload-sarif@v3.28.15
with:
sarif_file: ${{ steps.step1.outputs.sarif-output }}
category: "/language:${{matrix.language}}"

View File

@ -60,6 +60,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@5eb3ed6614230b1931d5c08df9e096e4ba524f21
uses: github/codeql-action/upload-sarif@4c3e5362829f0b0bb62ff5f6c938d7f95574c306
with:
sarif_file: results.sarif

View File

@ -98,19 +98,9 @@ def run_clang_format_diff(root: Path, commits: str) -> bool:
code before committing the PR, or it might fail to pass the CI check:
1. Install clang-format-14.0.0
You can download the package from
https://github.com/llvm/llvm-project/releases
and install it.
For Debian/Ubuntu, we can probably use
`sudo apt-get install clang-format-14`.
Homebrew has it as a part of llvm@14.
```shell
brew install llvm@14
/usr/local/opt/llvm@14/bin/clang-format
```
Normally we can install it by `sudo apt-get install clang-format-14`,
or download the package from https://github.com/llvm/llvm-project/releases
and install it
2. Format the C/C++ source file
``` shell

View File

@ -194,7 +194,7 @@ aot_intrinsic_clz_i32(uint32 type)
return num;
}
uint64
uint32
aot_intrinsic_clz_i64(uint64 type)
{
uint32 num = 0;
@ -220,7 +220,7 @@ aot_intrinsic_ctz_i32(uint32 type)
return num;
}
uint64
uint32
aot_intrinsic_ctz_i64(uint64 type)
{
uint32 num = 0;
@ -244,7 +244,7 @@ aot_intrinsic_popcnt_i32(uint32 u)
return ret;
}
uint64
uint32
aot_intrinsic_popcnt_i64(uint64 u)
{
uint32 ret = 0;

View File

@ -186,19 +186,19 @@ aot_intrinsic_fmax_f64(float64 a, float64 b);
uint32
aot_intrinsic_clz_i32(uint32 type);
uint64
uint32
aot_intrinsic_clz_i64(uint64 type);
uint32
aot_intrinsic_ctz_i32(uint32 type);
uint64
uint32
aot_intrinsic_ctz_i64(uint64 type);
uint32
aot_intrinsic_popcnt_i32(uint32 u);
uint64
uint32
aot_intrinsic_popcnt_i64(uint64 u);
float32

View File

@ -3189,12 +3189,10 @@ do_text_relocation(AOTModule *module, AOTRelocationGroup *group,
symbol_addr = module->code;
}
else if (!strcmp(symbol, ".data") || !strcmp(symbol, ".sdata")
|| !strcmp(symbol, ".rdata") || !strcmp(symbol, ".rodata")
|| !strcmp(symbol, ".srodata")
|| !strcmp(symbol, ".rdata")
|| !strcmp(symbol, ".rodata")
/* ".rodata.cst4/8/16/.." */
|| !strncmp(symbol, ".rodata.cst", strlen(".rodata.cst"))
/* ".srodata.cst4/8/16/.." */
|| !strncmp(symbol, ".srodata.cst", strlen(".srodata.cst"))
/* ".rodata.strn.m" */
|| !strncmp(symbol, ".rodata.str", strlen(".rodata.str"))
|| !strcmp(symbol, AOT_STACK_SIZES_SECTION_NAME)

View File

@ -3270,17 +3270,8 @@ is_data_section(AOTObjectData *obj_data, LLVMSectionIteratorRef sec_itr,
return (!strcmp(section_name, ".data") || !strcmp(section_name, ".sdata")
|| !strcmp(section_name, ".rodata")
#if LLVM_VERSION_MAJOR >= 19
/* https://github.com/llvm/llvm-project/pull/82214 */
|| !strcmp(section_name, ".srodata")
#endif
/* ".rodata.cst4/8/16/.." */
|| !strncmp(section_name, ".rodata.cst", strlen(".rodata.cst"))
#if LLVM_VERSION_MAJOR >= 19
/* https://github.com/llvm/llvm-project/pull/82214
* ".srodata.cst4/8/16/.." */
|| !strncmp(section_name, ".srodata.cst", strlen(".srodata.cst"))
#endif
/* ".rodata.strn.m" */
|| !strncmp(section_name, ".rodata.str", strlen(".rodata.str"))
|| (!strcmp(section_name, ".rdata")

View File

@ -2801,23 +2801,10 @@ aot_create_comp_context(const AOTCompData *comp_data, aot_comp_option_t option)
}
else {
/* Create LLVM target machine */
if (!option->target_arch || !strstr(option->target_arch, "-")) {
/* Retrieve the target triple based on user input */
triple = NULL;
arch = option->target_arch;
abi = option->target_abi;
cpu = option->target_cpu;
features = option->cpu_features;
}
else {
/* Form a target triple */
triple = option->target_arch;
arch = NULL;
abi = NULL;
cpu = NULL;
features = NULL;
}
arch = option->target_arch;
abi = option->target_abi;
cpu = option->target_cpu;
features = option->cpu_features;
opt_level = option->opt_level;
size_level = option->size_level;
@ -3058,7 +3045,6 @@ aot_create_comp_context(const AOTCompData *comp_data, aot_comp_option_t option)
aot_set_last_error(buf);
goto fail;
}
LOG_VERBOSE("triple: %s => normailized: %s", triple, triple_norm);
if (!cpu)
cpu = "";
}

View File

@ -118,7 +118,7 @@ os_dcache_flush()
up_textheap_data_sync();
#endif
#ifndef CONFIG_BUILD_KERNEL
up_flush_dcache_all();
up_invalidate_dcache_all();
#endif
}

View File

@ -116,9 +116,6 @@ print_help()
printf(" Default is host arch, e.g. x86_64\n");
printf(" <sub> = for ex. on arm or thumb: v5, v6m, v7a, v7m, etc.\n");
printf(" Use --target=help to list supported targets\n");
printf(" Or, provide a triple in the format of <arch>-<vendor>-<os>-<abi>.\n");
printf(" By doing this, --target-abi, --cpu, and --cpu-features will be ignored.\n");
printf(" The triple will only be normalized without any further verification.\n");
printf(" --target-abi=<abi> Set the target ABI, e.g. gnu, eabi, gnueabihf, msvc, etc.\n");
printf(" Default is gnu if target isn't riscv64 or riscv32\n");
printf(" For target riscv64 and riscv32, default is lp64d and ilp32d\n");