Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug on ARM and add UDF instruction #58

Merged
merged 4 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ci-scripts/ci-eslint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

## NPM eslint
npm install -s eslint
npm install --save-dev eslint

## NPM test
find ./js -type f -name "*.js" | xargs node_modules/.bin/eslint -c ./.eslintrc.json
find ./js -type f -name "*.js" | xargs node_modules/.bin/eslint --stats -c ./.eslint.config.js
40 changes: 21 additions & 19 deletions .eslintrc.json → .eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
{
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {}
module.exports = {
"languageOptions": {
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {}
},
"globals": {
"process": true,
"BigInt": true,
"Global": true,
"Limits": true,
"rizin": true,
"atob": true,
"btoa": true,
"unit": true,
"console": true
}
},
"extends": "eslint:recommended",
"rules": {
"semi": [2, "always"],
"no-console": ["error", {
Expand All @@ -18,6 +30,7 @@
}],
"no-unused-vars": ["error", {
"varsIgnorePattern": "jsdec_|\\binclude\\b",
"caughtErrors": "none",
"args": "none"
}],
"curly": "error",
Expand All @@ -26,17 +39,6 @@
"no-constant-condition": ["error", {
"checkLoops": false
}],
"no-control-regex": "warn"
},
"globals": {
"process": true,
"BigInt": true,
"Global": true,
"Limits": true,
"rizin": true,
"atob": true,
"btoa": true,
"unit": true,
"console": true
"no-control-regex": "warn"
}
}
};
2 changes: 1 addition & 1 deletion .github/workflows/continuous-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "16"
node-version: "21"
- name: eslint
run: chmod +x .ci-scripts/ci-eslint.sh && .ci-scripts/ci-eslint.sh

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
build*/
subprojects/libquick*/
node_modules/
package.json
package-lock.json
2 changes: 1 addition & 1 deletion .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Files: .github/**/*
Copyright: 2018-2021 Giovanni Dante Grazioli <[email protected]>
License: BSD-3-Clause

Files: .eslintrc.json
Files: .eslint.config.js
Copyright: 2018-2021 Giovanni Dante Grazioli <[email protected]>
License: BSD-3-Clause

Expand Down
5 changes: 5 additions & 0 deletions js/libdec/arch/arm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1537,6 +1537,9 @@ var _arm = {
fcvt: function(instr) {
return Base.cast(instr.parsed.opd[0], instr.parsed.opd[1], instr.parsed.opd[0][0] == 's' ? 'float' : 'double');
},
udf: function() {
return Base.nop();
},
invalid: function() {
return Base.nop();
}
Expand All @@ -1547,6 +1550,8 @@ var _arm = {
asm = orig;
} else if (asm.match(/aav\.[\da-fA-F]+/)) {
asm = orig;
} else if (asm.match(/data\.[\da-fA-F]+/)) {
asm = orig;
}
var ret = asm.replace(/(\[|\])/g, ' $1 ').replace(/,/g, ' ');
ret = ret.replace(/\{|\}/g, ' ').replace(/#/g, ' ');
Expand Down
Loading