mirror of
https://github.com/love2d/love-android.git
synced 2026-08-13 17:11:01 +02:00
Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7a32a370f9 | |||
| 8687928a33 | |||
| 6d67b15e79 | |||
| ecb5076b3d | |||
| 3b80a5a766 | |||
| 69cfcd25fb | |||
| 8bbe71a6bb | |||
| d9ea1f60a5 | |||
| a3b1903250 | |||
| 044d5b5e34 | |||
| abd98a1378 | |||
| 86dbfffcfc | |||
| b2686d98e5 | |||
| 11d99352dc | |||
| f2970f47b1 | |||
| 8a882cabc0 | |||
| f7bc09eac0 | |||
| 8b77791aeb | |||
| eac9c7dc6a | |||
| d257a3b987 | |||
| af732a0f47 | |||
| 9b9cc15813 | |||
| eeb47f70c0 | |||
| 729c355674 | |||
| 81ff3acca7 | |||
| 0b106828b2 | |||
| 5187166c3d | |||
| c8ebfc3427 | |||
| bda684ae1c | |||
| 7ee3735d1a | |||
| 55853d5850 | |||
| f9eca86935 | |||
| 5d34bf94f3 | |||
| acb97d6f87 | |||
| a1868f713d | |||
| 569df256e3 | |||
| 349c1e3dda | |||
| 75fd79b37a | |||
| 187e408d0b | |||
| eddaf2d70a | |||
| a0740420e8 | |||
| 69dcd4b63b | |||
| a46d4211e6 | |||
| d72a5e4f1e | |||
| ca0fe2c4ca | |||
| feb20972b5 | |||
| 63d53f3584 | |||
| bed7d5c826 | |||
| 542560bb2d |
@@ -7,39 +7,39 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Setup Java 11
|
||||
uses: actions/setup-java@v2
|
||||
- name: Setup Java 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: adopt-hotspot
|
||||
java-version: 11
|
||||
java-version: 17
|
||||
cache: gradle
|
||||
- name: Build
|
||||
run: bash ./gradlew assembleNormalRecord assembleEmbedRelease bundleNormalNoRecordRelease bundleEmbedRecordRelease bundleEmbedNoRecordRelease
|
||||
- name: Artifact (Normal debug APK)
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: love-android-debug.apk
|
||||
path: app/build/outputs/apk/normalRecord/debug/app-normal-record-debug.apk
|
||||
- name: Artifact (Normal unsigned APK)
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: love-android.apk
|
||||
path: app/build/outputs/apk/normalRecord/release/app-normal-record-release-unsigned.apk
|
||||
- name: Artifact (Normal AAB w/o recording)
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: love-android-ps.aab
|
||||
path: app/build/outputs/bundle/normalNoRecordRelease/app-normal-noRecord-release.aab
|
||||
- name: Artifact (Embed AAB)
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: love-android-embed-record.aab
|
||||
path: app/build/outputs/bundle/embedRecordRelease/app-embed-record-release.aab
|
||||
- name: Artifact (Embed AAB w/o recording)
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: love-android-embed.aab
|
||||
path: app/build/outputs/bundle/embedNoRecordRelease/app-embed-noRecord-release.aab
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Android Port of LÖVE, an awesome 2D game engine for Lua (http://love2d.org)
|
||||
Copyright (c) 2006-2022 LOVE Development Team
|
||||
Copyright (c) 2006-2023 LOVE Development Team
|
||||
|
||||

|
||||

|
||||
|
||||
Download:
|
||||
---------
|
||||
@@ -38,33 +38,33 @@ Detailed instructions can be viewed at https://github.com/love2d/love-android/wi
|
||||
Quick Start:
|
||||
------------
|
||||
|
||||
Before you start, install JDK 11 or later. If you intend to build from Android Studio, skip this step as
|
||||
Android Studio bundles its own JDK 11.
|
||||
Before you start, install JDK 17 (not later not earlier). If you intend to build from Android Studio, skip this step as
|
||||
Android Studio bundles its own JDK 17.
|
||||
|
||||
Install Android SDK with SDK API 31 (31.0.0) and Android NDK 21.3.6528147, set the environment variables
|
||||
`ANDROID_SDK_ROOT` to your Android SDK location and run.
|
||||
Install Android SDK with SDK API 34 (34.x.y) and Android NDK 25.2.9519653, set the environment variable
|
||||
`ANDROID_SDK_ROOT` to your Android SDK location and run:
|
||||
|
||||
```
|
||||
$ ./gradlew assembleNormalRecord
|
||||
```
|
||||
|
||||
in the root folder of this project. This should give you a .apk file in the `app/build/outputs/apk/normalRecord`
|
||||
subdirectory that you can then sign and install on your phone. The `normalRecord` .apk flavor is what you normally have
|
||||
when downloading one from https://love2d.org.
|
||||
in the root folder of this project. This should give you an .apk file in the `app/build/outputs/apk/normalRecord`
|
||||
subdirectory that you can then sign and install on your phone. The `normalRecord` .apk variant is what you normally have
|
||||
when downloading APK from https://love2d.org.
|
||||
|
||||
If you want to put your game inside the APK, you can either:
|
||||
|
||||
1. Put all your games in `app/src/embed/assets` such that your `main.lua` path is `app/src/embed/assets/main.lua`; or
|
||||
2. Put your zipped \*.love in `app/src/embed/assets` with name `game.love`
|
||||
|
||||
And change the package name, application version string and codes, application display name, and the icons (see
|
||||
And change the application id, application version string and codes, application display name, and the icons (see
|
||||
[Game Packaging Wiki](https://github.com/love2d/love-android/wiki/Game-Packaging). Afterwards,
|
||||
run either `gradlew assembleEmbedNoRecordRelease` (or `gradlew assembleEmbedRecordRelease` if your game uses microphone) to
|
||||
generate APK which you can install or `gradlew bundleEmbedNoRecordRelease` (or `gradlew bundleEmbedRecordRelease`) to generate
|
||||
AAB which you can upload to Play Store.
|
||||
|
||||
Alternatively, you can install Android Studio **2020.3.1** or later. After opening it for the first time, open its SDK Manager
|
||||
and on the tab "SDK Tools", tick "Show Package Details" then select NDK (Side By Side) version 21.3.6528147. After that, open
|
||||
Alternatively, you can install Android Studio **2022.3.1** or later. After opening it for the first time, open its SDK Manager
|
||||
and on the tab "SDK Tools", tick "Show Package Details" then select NDK (Side By Side) version 25.2.9519653. After that, open
|
||||
the repository root.
|
||||
|
||||
Notice: Previously, the embed + APKTool method is preferred, but recent announcements by Google render that method obsolete.
|
||||
@@ -76,9 +76,17 @@ Bugs and/or feature requests should be reported to the issue tracker at:
|
||||
* https://github.com/love2d/love-android/issues - LÖVE-Android-specific issues
|
||||
* https://github.com/love2d/love/issues - for LÖVE in general
|
||||
|
||||
Note: If in doubt, fill an issue report to https://github.com/love2d/love/issues. We'll transfer the issue to this repository as needed.
|
||||
|
||||
Changelog:
|
||||
----------
|
||||
|
||||
11.5:
|
||||
|
||||
* Contains all relevant changes for desktop LÖVE [11.5](https://love2d.org/wiki/11.5).
|
||||
* Fixed audio in Android still playing in the background in certain cases. ([love2d/love#1828](https://github.com/love2d/love/issues/1828))
|
||||
|
||||
|
||||
11.4:
|
||||
|
||||
* Contains all relevant changes for desktop LÖVE [11.4](https://love2d.org/wiki/11.4).
|
||||
|
||||
+38
-11
@@ -1,15 +1,42 @@
|
||||
import java.nio.charset.StandardCharsets
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
buildToolsVersion '31.0.0'
|
||||
ndkVersion '21.3.6528147'
|
||||
namespace "org.love2d.android.executable"
|
||||
ndkVersion '25.2.9519653'
|
||||
|
||||
defaultConfig {
|
||||
applicationId 'org.love2d.android'
|
||||
versionCode 30
|
||||
versionName '11.4'
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 31
|
||||
applicationId project.properties["app.application_id"]
|
||||
versionCode project.properties["app.version_code"].toInteger()
|
||||
versionName project.properties["app.version_name"]
|
||||
minSdk 16
|
||||
compileSdk 34
|
||||
targetSdk 34
|
||||
|
||||
def getAppName = {
|
||||
def nameArray = project.properties["app.name_byte_array"]
|
||||
def name = project.properties["app.name"]
|
||||
if (name != null && nameArray != null) {
|
||||
throw new Exception("Only define either `app.name` or `app.name_byte_array` in gradle.properties, but not both!")
|
||||
}
|
||||
|
||||
if (name == null) {
|
||||
def nameArraySplit = nameArray.split(",")
|
||||
def nameBytes = new byte[nameArraySplit.length]
|
||||
def count = 0
|
||||
for (String s: nameArraySplit) {
|
||||
nameBytes[count++] = (byte) Integer.parseInt(s)
|
||||
}
|
||||
return new String(nameBytes, StandardCharsets.UTF_8)
|
||||
}
|
||||
return name
|
||||
}
|
||||
|
||||
manifestPlaceholders = [
|
||||
NAME:getAppName(),
|
||||
ORIENTATION:project.properties["app.orientation"],
|
||||
]
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
@@ -17,7 +44,7 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
flavorDimensions 'mode', 'recording'
|
||||
flavorDimensions = ['mode', 'recording']
|
||||
productFlavors {
|
||||
normal {
|
||||
dimension 'mode'
|
||||
@@ -32,7 +59,7 @@ android {
|
||||
dimension 'recording'
|
||||
}
|
||||
}
|
||||
lintOptions {
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
}
|
||||
@@ -40,6 +67,6 @@ android {
|
||||
dependencies {
|
||||
api 'androidx.multidex:multidex:2.0.1'
|
||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||
api 'androidx.appcompat:appcompat:1.4.0'
|
||||
api 'androidx.appcompat:appcompat:1.6.1'
|
||||
api project(':love')
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest
|
||||
package="org.love2d.android.executable"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
@@ -25,15 +23,15 @@
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/love"
|
||||
android:label="LÖVE for Android"
|
||||
android:label="${NAME}"
|
||||
android:usesCleartextTraffic="true" >
|
||||
<activity
|
||||
android:name="org.love2d.android.GameActivity"
|
||||
android:exported="true"
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden|navigation"
|
||||
android:label="LÖVE for Android"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="landscape"
|
||||
android:label="${NAME}"
|
||||
android:launchMode="singleInstance"
|
||||
android:screenOrientation="${ORIENTATION}"
|
||||
android:resizeableActivity="false"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
|
||||
<intent-filter>
|
||||
@@ -46,4 +44,4 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
||||
</manifest>
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest
|
||||
package="org.love2d.android.executable"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
>
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" tools:node="remove" />
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest
|
||||
package="org.love2d.android.executable"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools" >
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="28" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28" tools:replace="maxSdkVersion" />
|
||||
@@ -54,5 +52,17 @@
|
||||
android:pathPattern=".*\\.love" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name="org.love2d.android.SelectorActivity"
|
||||
android:label="LÖVE Loader"
|
||||
android:exported="true"
|
||||
android:enabled="@bool/selector_active"
|
||||
android:theme="@style/Theme.AppCompat.NoActionBar" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="tv.ouya.intent.category.GAME" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.0.3'
|
||||
classpath 'com.android.tools.build:gradle:8.1.1'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
||||
+19
-2
@@ -1,2 +1,19 @@
|
||||
android.enableJetifier=true
|
||||
android.useAndroidX=true
|
||||
# To set the application display name, only define either `app.name` or `app.name_byte_array`.
|
||||
# For a rule of thumb:
|
||||
# * Use `app.name` if your app name doesn't contain any non-ANSI characters.
|
||||
# * Otherwise, convert your app name to UTF-8 byte array, comma delimited, and put
|
||||
# it in `app.name_byte_array`
|
||||
#app.name=LÖVE for Android
|
||||
app.name_byte_array=76,195,150,86,69,32,102,111,114,32,65,110,100,114,111,105,100
|
||||
|
||||
app.application_id=org.love2d.android
|
||||
app.orientation=landscape
|
||||
app.version_code=31
|
||||
app.version_name=11.5
|
||||
|
||||
# No need to modify anything past this line!
|
||||
android.enableJetifier=false
|
||||
android.useAndroidX=true
|
||||
android.defaults.buildfeatures.buildconfig=true
|
||||
android.nonTransitiveRClass=true
|
||||
android.nonFinalResIds=true
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+2
-1
@@ -1,5 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -32,10 +32,10 @@
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
@@ -55,7 +55,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -80,10 +80,10 @@ do
|
||||
esac
|
||||
done
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
@@ -143,12 +143,16 @@ fi
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
@@ -205,6 +209,12 @@ set -- \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
|
||||
Vendored
+9
-6
@@ -14,7 +14,7 @@
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@@ -25,7 +25,8 @@
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
@@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
+173
-2
@@ -6,17 +6,22 @@ This distribution contains code from the following projects (full license text b
|
||||
- LOVE
|
||||
Website: https://love2d.org/
|
||||
License: zlib
|
||||
Copyright (c) 2006-2022 LOVE Development Team
|
||||
Copyright (c) 2006-2023 LOVE Development Team
|
||||
|
||||
- ENet
|
||||
Website: http://enet.bespin.org/index.html
|
||||
License: MIT/Expat
|
||||
Copyright (c) 2002-2016 Lee Salzman
|
||||
|
||||
- FreeType
|
||||
Website: https://freetype.org/
|
||||
License: FreeType License
|
||||
Copyright (c) 2006-2017 David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
|
||||
- GLAD
|
||||
Website: http://glad.dav1d.de/
|
||||
License: MIT/Expat
|
||||
Copyright (c) 2013 David Herberth, modified by Alex Szpakowski
|
||||
Copyright (c) 2013 David Herberth, modified by Sasha Szpakowski
|
||||
|
||||
- glslang
|
||||
Website: https://github.com/KhronosGroup/glslang
|
||||
@@ -186,6 +191,172 @@ MIT/Expat
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
FreeType License
|
||||
The FreeType Project LICENSE
|
||||
----------------------------
|
||||
|
||||
2006-Jan-27
|
||||
|
||||
Copyright 1996-2002, 2006 by
|
||||
David Turner, Robert Wilhelm, and Werner Lemberg
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
The FreeType Project is distributed in several archive packages;
|
||||
some of them may contain, in addition to the FreeType font engine,
|
||||
various tools and contributions which rely on, or relate to, the
|
||||
FreeType Project.
|
||||
|
||||
This license applies to all files found in such packages, and
|
||||
which do not fall under their own explicit license. The license
|
||||
affects thus the FreeType font engine, the test programs,
|
||||
documentation and makefiles, at the very least.
|
||||
|
||||
This license was inspired by the BSD, Artistic, and IJG
|
||||
(Independent JPEG Group) licenses, which all encourage inclusion
|
||||
and use of free software in commercial and freeware products
|
||||
alike. As a consequence, its main points are that:
|
||||
|
||||
o We don't promise that this software works. However, we will be
|
||||
interested in any kind of bug reports. (`as is' distribution)
|
||||
|
||||
o You can use this software for whatever you want, in parts or
|
||||
full form, without having to pay us. (`royalty-free' usage)
|
||||
|
||||
o You may not pretend that you wrote this software. If you use
|
||||
it, or only parts of it, in a program, you must acknowledge
|
||||
somewhere in your documentation that you have used the
|
||||
FreeType code. (`credits')
|
||||
|
||||
We specifically permit and encourage the inclusion of this
|
||||
software, with or without modifications, in commercial products.
|
||||
We disclaim all warranties covering The FreeType Project and
|
||||
assume no liability related to The FreeType Project.
|
||||
|
||||
|
||||
Finally, many people asked us for a preferred form for a
|
||||
credit/disclaimer to use in compliance with this license. We thus
|
||||
encourage you to use the following text:
|
||||
|
||||
"""
|
||||
Portions of this software are copyright © <year> The FreeType
|
||||
Project (www.freetype.org). All rights reserved.
|
||||
"""
|
||||
|
||||
Please replace <year> with the value from the FreeType version you
|
||||
actually use.
|
||||
|
||||
|
||||
Legal Terms
|
||||
===========
|
||||
|
||||
0. Definitions
|
||||
--------------
|
||||
|
||||
Throughout this license, the terms `package', `FreeType Project',
|
||||
and `FreeType archive' refer to the set of files originally
|
||||
distributed by the authors (David Turner, Robert Wilhelm, and
|
||||
Werner Lemberg) as the `FreeType Project', be they named as alpha,
|
||||
beta or final release.
|
||||
|
||||
`You' refers to the licensee, or person using the project, where
|
||||
`using' is a generic term including compiling the project's source
|
||||
code as well as linking it to form a `program' or `executable'.
|
||||
This program is referred to as `a program using the FreeType
|
||||
engine'.
|
||||
|
||||
This license applies to all files distributed in the original
|
||||
FreeType Project, including all source code, binaries and
|
||||
documentation, unless otherwise stated in the file in its
|
||||
original, unmodified form as distributed in the original archive.
|
||||
If you are unsure whether or not a particular file is covered by
|
||||
this license, you must contact us to verify this.
|
||||
|
||||
The FreeType Project is copyright (C) 1996-2000 by David Turner,
|
||||
Robert Wilhelm, and Werner Lemberg. All rights reserved except as
|
||||
specified below.
|
||||
|
||||
1. No Warranty
|
||||
--------------
|
||||
|
||||
THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO
|
||||
USE, OF THE FREETYPE PROJECT.
|
||||
|
||||
2. Redistribution
|
||||
-----------------
|
||||
|
||||
This license grants a worldwide, royalty-free, perpetual and
|
||||
irrevocable right and license to use, execute, perform, compile,
|
||||
display, copy, create derivative works of, distribute and
|
||||
sublicense the FreeType Project (in both source and object code
|
||||
forms) and derivative works thereof for any purpose; and to
|
||||
authorize others to exercise some or all of the rights granted
|
||||
herein, subject to the following conditions:
|
||||
|
||||
o Redistribution of source code must retain this license file
|
||||
(`FTL.TXT') unaltered; any additions, deletions or changes to
|
||||
the original files must be clearly indicated in accompanying
|
||||
documentation. The copyright notices of the unaltered,
|
||||
original files must be preserved in all copies of source
|
||||
files.
|
||||
|
||||
o Redistribution in binary form must provide a disclaimer that
|
||||
states that the software is based in part of the work of the
|
||||
FreeType Team, in the distribution documentation. We also
|
||||
encourage you to put an URL to the FreeType web page in your
|
||||
documentation, though this isn't mandatory.
|
||||
|
||||
These conditions apply to any software derived from or based on
|
||||
the FreeType Project, not just the unmodified files. If you use
|
||||
our work, you must acknowledge us. However, no fee need be paid
|
||||
to us.
|
||||
|
||||
3. Advertising
|
||||
--------------
|
||||
|
||||
Neither the FreeType authors and contributors nor you shall use
|
||||
the name of the other for commercial, advertising, or promotional
|
||||
purposes without specific prior written permission.
|
||||
|
||||
We suggest, but do not require, that you use one or more of the
|
||||
following phrases to refer to this software in your documentation
|
||||
or advertising materials: `FreeType Project', `FreeType Engine',
|
||||
`FreeType library', or `FreeType Distribution'.
|
||||
|
||||
As you have not signed this license, you are not required to
|
||||
accept it. However, as the FreeType Project is copyrighted
|
||||
material, only this license, or another one contracted with the
|
||||
authors, grants you the right to use, distribute, and modify it.
|
||||
Therefore, by using, distributing, or modifying the FreeType
|
||||
Project, you indicate that you understand and accept all the terms
|
||||
of this license.
|
||||
|
||||
4. Contacts
|
||||
-----------
|
||||
|
||||
There are two mailing lists related to FreeType:
|
||||
|
||||
o freetype@nongnu.org
|
||||
|
||||
Discusses general use and applications of FreeType, as well as
|
||||
future and wanted additions to the library and distribution.
|
||||
If you are looking for support, start in this list if you
|
||||
haven't found anything to help you in the documentation.
|
||||
|
||||
o freetype-devel@nongnu.org
|
||||
|
||||
Discusses bugs, as well as engine internals, design issues,
|
||||
specific licenses, porting, etc.
|
||||
|
||||
Our home page can be found at
|
||||
|
||||
http://www.freetype.org
|
||||
|
||||
3-Clause BSD
|
||||
All rights reserved.
|
||||
|
||||
|
||||
+22
-15
@@ -6,14 +6,13 @@ android {
|
||||
// See https://code.google.com/p/android/issues/detail?id=52962
|
||||
// and http://stackoverflow.com/questions/27277433/why-does-gradle-build-my-module-in-release-mode-when-the-app-is-in-debug
|
||||
// defaultPublishConfig "debug"
|
||||
compileSdkVersion 31
|
||||
buildToolsVersion '31.0.0'
|
||||
ndkVersion '21.3.6528147'
|
||||
namespace "org.love2d.android"
|
||||
ndkVersion '25.2.9519653'
|
||||
|
||||
defaultConfig {
|
||||
compileSdkVersion 31
|
||||
buildToolsVersion '31.0.0'
|
||||
minSdkVersion 16
|
||||
minSdk 16
|
||||
compileSdk 34
|
||||
targetSdk 34
|
||||
externalNativeBuild {
|
||||
ndkBuild {
|
||||
arguments "-j" + Runtime.runtime.availableProcessors()
|
||||
@@ -22,10 +21,10 @@ android {
|
||||
ndk {
|
||||
// Specifies the ABI configurations of your native
|
||||
// libraries Gradle should build and package with your APK.
|
||||
// noinspection ChromeOsAbiSupport
|
||||
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
||||
debugSymbolLevel 'SYMBOL_TABLE'
|
||||
}
|
||||
targetSdkVersion 31
|
||||
}
|
||||
|
||||
def retrieveAll3pModules = { ->
|
||||
@@ -34,6 +33,7 @@ android {
|
||||
fileTree("src/jni/lua-modules").visit { FileVisitDetails details ->
|
||||
if (details.isDirectory()) {
|
||||
if (file(details.file.path + "/Android.mk").exists()) {
|
||||
def logger = project.getLogger()
|
||||
logger.lifecycle("3rd-party module: " + details.file.path)
|
||||
|
||||
def javainfo = file(details.file.path + "/java.txt")
|
||||
@@ -41,7 +41,7 @@ android {
|
||||
def fstream = new FileInputStream(javainfo)
|
||||
def infile = new BufferedReader(new InputStreamReader(fstream))
|
||||
def javapath = infile.readLine().replace("\\", "/")
|
||||
def mpath = null
|
||||
def mpath = ""
|
||||
|
||||
if (javapath[0] != '/') {
|
||||
mpath = details.file.path + "/" + javapath
|
||||
@@ -68,11 +68,12 @@ android {
|
||||
}
|
||||
debug {
|
||||
ndk {
|
||||
// noinspection ChromeOsAbiSupport
|
||||
abiFilters += 'x86_64'
|
||||
}
|
||||
}
|
||||
}
|
||||
flavorDimensions 'mode'
|
||||
flavorDimensions = ['mode']
|
||||
productFlavors {
|
||||
normal {
|
||||
dimension 'mode'
|
||||
@@ -100,16 +101,22 @@ android {
|
||||
path 'src/jni/Android.mk'
|
||||
}
|
||||
}
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
packagingOptions {
|
||||
exclude 'lib/arm64-v8a/libSDL2.so'
|
||||
exclude 'lib/armeabi-v7a/libSDL2.so'
|
||||
jniLibs {
|
||||
excludes += [
|
||||
'lib/arm64-v8a/libSDL2.so',
|
||||
'lib/armeabi-v7a/libSDL2.so',
|
||||
'lib/x86_64/libSDL2.so',
|
||||
'lib/x86/libSDL2.so'
|
||||
]
|
||||
}
|
||||
}
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||
api 'androidx.appcompat:appcompat:1.4.0'
|
||||
api 'androidx.appcompat:appcompat:1.6.1'
|
||||
}
|
||||
|
||||
+12
-3
@@ -1,7 +1,16 @@
|
||||
LOVE_JNI_DIR := $(call my-dir)
|
||||
IS_NDK_R17 := $(shell python ${LOVE_JNI_DIR}/detect_ndkrel.py $(NDK_ROOT)/source.properties 17)
|
||||
IS_ANDROID_21 := $(shell python ${LOVE_JNI_DIR}/detect_androidapi.py $(TARGET_PLATFORM) 21)
|
||||
HAS_LOVE := $(shell python ${LOVE_JNI_DIR}/detect_love.py ${LOVE_JNI_DIR})
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
SHELL_EXECUTOR := powershell -executionpolicy unrestricted
|
||||
SCRIPT_EXTENSION := ps1
|
||||
else
|
||||
SHELL_EXECUTOR := sh
|
||||
SCRIPT_EXTENSION := sh
|
||||
endif
|
||||
|
||||
IS_NDK_R17 := $(shell ${SHELL_EXECUTOR} ${LOVE_JNI_DIR}/detect_ndkrel.${SCRIPT_EXTENSION} $(NDK_ROOT)/source.properties 17)
|
||||
IS_ANDROID_21 := $(shell ${SHELL_EXECUTOR} ${LOVE_JNI_DIR}/detect_androidapi.${SCRIPT_EXTENSION} $(TARGET_PLATFORM) 21)
|
||||
HAS_LOVE := $(shell ${SHELL_EXECUTOR} ${LOVE_JNI_DIR}/detect_love.${SCRIPT_EXTENSION} ${LOVE_JNI_DIR})
|
||||
|
||||
ifneq (${HAS_LOVE},yes)
|
||||
$(error Missing LOVE. Make sure to initialize the submodule correctly!)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/.relver export-subst
|
||||
@@ -0,0 +1 @@
|
||||
1700008891
|
||||
@@ -4,6 +4,6 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libluajit
|
||||
LOCAL_SRC_FILES := android/$(TARGET_ARCH_ABI)/libluajit.a
|
||||
LOCAL_EXPORT_C_INCLUDES := ${LOCAL_PATH}/src
|
||||
LOCAL_EXPORT_C_INCLUDES := ${LOCAL_PATH}/src ${LOCAL_PATH}/android/$(TARGET_ARCH_ABI)
|
||||
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
===============================================================================
|
||||
LuaJIT -- a Just-In-Time Compiler for Lua. https://luajit.org/
|
||||
|
||||
Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -10,16 +10,21 @@
|
||||
# For MSVC, please follow the instructions given in src/msvcbuild.bat.
|
||||
# For MinGW and Cygwin, cd to src and run make with the Makefile there.
|
||||
#
|
||||
# Copyright (C) 2005-2021 Mike Pall. See Copyright Notice in luajit.h
|
||||
# Copyright (C) 2005-2023 Mike Pall. See Copyright Notice in luajit.h
|
||||
##############################################################################
|
||||
|
||||
MAJVER= 2
|
||||
MINVER= 1
|
||||
RELVER= 0
|
||||
PREREL= -beta3
|
||||
VERSION= $(MAJVER).$(MINVER).$(RELVER)$(PREREL)
|
||||
ABIVER= 5.1
|
||||
|
||||
# LuaJIT uses rolling releases. The release version is based on the time of
|
||||
# the latest git commit. The 'git' command must be available during the build.
|
||||
RELVER= $(shell cat src/luajit_relver.txt 2>/dev/null || : )
|
||||
# Note: setting it with := doesn't work, since it will change during the build.
|
||||
|
||||
MMVERSION= $(MAJVER).$(MINVER)
|
||||
VERSION= $(MMVERSION).$(RELVER)
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Change the installation path as needed. This automatically adjusts
|
||||
@@ -33,9 +38,10 @@ DPREFIX= $(DESTDIR)$(PREFIX)
|
||||
INSTALL_BIN= $(DPREFIX)/bin
|
||||
INSTALL_LIB= $(DPREFIX)/$(MULTILIB)
|
||||
INSTALL_SHARE= $(DPREFIX)/share
|
||||
INSTALL_INC= $(DPREFIX)/include/luajit-$(MAJVER).$(MINVER)
|
||||
INSTALL_DEFINC= $(DPREFIX)/include/luajit-$(MMVERSION)
|
||||
INSTALL_INC= $(INSTALL_DEFINC)
|
||||
|
||||
INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(VERSION)
|
||||
INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(MMVERSION)
|
||||
INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit
|
||||
INSTALL_LMODD= $(INSTALL_SHARE)/lua
|
||||
INSTALL_LMOD= $(INSTALL_LMODD)/$(ABIVER)
|
||||
@@ -49,10 +55,10 @@ INSTALL_TSYMNAME= luajit
|
||||
INSTALL_ANAME= libluajit-$(ABIVER).a
|
||||
INSTALL_SOSHORT1= libluajit-$(ABIVER).so
|
||||
INSTALL_SOSHORT2= libluajit-$(ABIVER).so.$(MAJVER)
|
||||
INSTALL_SONAME= $(INSTALL_SOSHORT2).$(MINVER).$(RELVER)
|
||||
INSTALL_SONAME= libluajit-$(ABIVER).so.$(VERSION)
|
||||
INSTALL_DYLIBSHORT1= libluajit-$(ABIVER).dylib
|
||||
INSTALL_DYLIBSHORT2= libluajit-$(ABIVER).$(MAJVER).dylib
|
||||
INSTALL_DYLIBNAME= libluajit-$(ABIVER).$(MAJVER).$(MINVER).$(RELVER).dylib
|
||||
INSTALL_DYLIBNAME= libluajit-$(ABIVER).$(VERSION).dylib
|
||||
INSTALL_PCNAME= luajit.pc
|
||||
|
||||
INSTALL_STATIC= $(INSTALL_LIB)/$(INSTALL_ANAME)
|
||||
@@ -77,7 +83,11 @@ INSTALL_F= install -m 0644
|
||||
UNINSTALL= $(RM)
|
||||
LDCONFIG= ldconfig -n 2>/dev/null
|
||||
SED_PC= sed -e "s|^prefix=.*|prefix=$(PREFIX)|" \
|
||||
-e "s|^multilib=.*|multilib=$(MULTILIB)|"
|
||||
-e "s|^multilib=.*|multilib=$(MULTILIB)|" \
|
||||
-e "s|^relver=.*|relver=$(RELVER)|"
|
||||
ifneq ($(INSTALL_DEFINC),$(INSTALL_INC))
|
||||
SED_PC+= -e "s|^includedir=.*|includedir=$(INSTALL_INC)|"
|
||||
endif
|
||||
|
||||
FILE_T= luajit
|
||||
FILE_A= libluajit.a
|
||||
@@ -88,7 +98,9 @@ FILES_INC= lua.h lualib.h lauxlib.h luaconf.h lua.hpp luajit.h
|
||||
FILES_JITLIB= bc.lua bcsave.lua dump.lua p.lua v.lua zone.lua \
|
||||
dis_x86.lua dis_x64.lua dis_arm.lua dis_arm64.lua \
|
||||
dis_arm64be.lua dis_ppc.lua dis_mips.lua dis_mipsel.lua \
|
||||
dis_mips64.lua dis_mips64el.lua vmdef.lua
|
||||
dis_mips64.lua dis_mips64el.lua \
|
||||
dis_mips64r6.lua dis_mips64r6el.lua \
|
||||
vmdef.lua
|
||||
|
||||
ifeq (,$(findstring Windows,$(OS)))
|
||||
HOST_SYS:= $(shell uname -s)
|
||||
@@ -109,9 +121,9 @@ endif
|
||||
INSTALL_DEP= src/luajit
|
||||
|
||||
default all $(INSTALL_DEP):
|
||||
@echo "==== Building LuaJIT $(VERSION) ===="
|
||||
@echo "==== Building LuaJIT $(MMVERSION) ===="
|
||||
$(MAKE) -C src
|
||||
@echo "==== Successfully built LuaJIT $(VERSION) ===="
|
||||
@echo "==== Successfully built LuaJIT $(MMVERSION) ===="
|
||||
|
||||
install: $(INSTALL_DEP)
|
||||
@echo "==== Installing LuaJIT $(VERSION) to $(PREFIX) ===="
|
||||
@@ -130,18 +142,12 @@ install: $(INSTALL_DEP)
|
||||
$(RM) $(FILE_PC).tmp
|
||||
cd src && $(INSTALL_F) $(FILES_INC) $(INSTALL_INC)
|
||||
cd src/jit && $(INSTALL_F) $(FILES_JITLIB) $(INSTALL_JITLIB)
|
||||
$(SYMLINK) $(INSTALL_TNAME) $(INSTALL_TSYM)
|
||||
@echo "==== Successfully installed LuaJIT $(VERSION) to $(PREFIX) ===="
|
||||
@echo ""
|
||||
@echo "Note: the development releases deliberately do NOT install a symlink for luajit"
|
||||
@echo "You can do this now by running this command (with sudo):"
|
||||
@echo ""
|
||||
@echo " $(SYMLINK) $(INSTALL_TNAME) $(INSTALL_TSYM)"
|
||||
@echo ""
|
||||
|
||||
|
||||
uninstall:
|
||||
@echo "==== Uninstalling LuaJIT $(VERSION) from $(PREFIX) ===="
|
||||
$(UNINSTALL) $(INSTALL_T) $(INSTALL_STATIC) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2) $(INSTALL_MAN)/$(FILE_MAN) $(INSTALL_PC)
|
||||
$(UNINSTALL) $(INSTALL_TSYM) $(INSTALL_T) $(INSTALL_STATIC) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2) $(INSTALL_MAN)/$(FILE_MAN) $(INSTALL_PC)
|
||||
for file in $(FILES_JITLIB); do \
|
||||
$(UNINSTALL) $(INSTALL_JITLIB)/$$file; \
|
||||
done
|
||||
@@ -155,8 +161,9 @@ uninstall:
|
||||
##############################################################################
|
||||
|
||||
amalg:
|
||||
@echo "Building LuaJIT $(VERSION)"
|
||||
@echo "==== Building LuaJIT $(MMVERSION) (amalgamation) ===="
|
||||
$(MAKE) -C src amalg
|
||||
@echo "==== Successfully built LuaJIT $(MMVERSION) (amalgamation) ===="
|
||||
|
||||
clean:
|
||||
$(MAKE) -C src clean
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
README for LuaJIT 2.1.0-beta3
|
||||
-----------------------------
|
||||
README for LuaJIT 2.1
|
||||
---------------------
|
||||
|
||||
LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language.
|
||||
|
||||
Project Homepage: https://luajit.org/
|
||||
|
||||
LuaJIT is Copyright (C) 2005-2021 Mike Pall.
|
||||
LuaJIT is Copyright (C) 2005-2023 Mike Pall.
|
||||
LuaJIT is free software, released under the MIT license.
|
||||
See full Copyright Notice in the COPYRIGHT file or in luajit.h.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT bytecode listing module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -41,7 +41,6 @@
|
||||
|
||||
-- Cache some library functions and objects.
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
local jutil = require("jit.util")
|
||||
local vmdef = require("jit.vmdef")
|
||||
local bit = require("bit")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT module to save/list bytecode.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -11,7 +11,7 @@
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
assert(jit.version_num == 20199, "LuaJIT core/library version mismatch")
|
||||
local bit = require("bit")
|
||||
|
||||
-- Symbol name prefix for LuaJIT bytecode.
|
||||
@@ -33,11 +33,12 @@ Save LuaJIT bytecode: luajit -b[options] input output
|
||||
-t type Set output file type (default: auto-detect from output name).
|
||||
-a arch Override architecture for object files (default: native).
|
||||
-o os Override OS for object files (default: native).
|
||||
-F name Override filename (default: input filename).
|
||||
-e chunk Use chunk string as input.
|
||||
-- Stop handling options.
|
||||
- Use stdin as input and/or stdout as output.
|
||||
|
||||
File types: c h obj o raw (default)
|
||||
File types: c cc h obj o raw (default)
|
||||
]]
|
||||
os.exit(1)
|
||||
end
|
||||
@@ -49,10 +50,22 @@ local function check(ok, ...)
|
||||
os.exit(1)
|
||||
end
|
||||
|
||||
local function readfile(input)
|
||||
local function readfile(ctx, input)
|
||||
if type(input) == "function" then return input end
|
||||
if input == "-" then input = nil end
|
||||
return check(loadfile(input))
|
||||
if ctx.filename then
|
||||
local data
|
||||
if input == "-" then
|
||||
data = io.stdin:read("*a")
|
||||
else
|
||||
local fp = assert(io.open(input, "rb"))
|
||||
data = assert(fp:read("*a"))
|
||||
assert(fp:close())
|
||||
end
|
||||
return check(load(data, ctx.filename))
|
||||
else
|
||||
if input == "-" then input = nil end
|
||||
return check(loadfile(input))
|
||||
end
|
||||
end
|
||||
|
||||
local function savefile(name, mode)
|
||||
@@ -68,7 +81,7 @@ end
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
local map_type = {
|
||||
raw = "raw", c = "c", h = "h", o = "obj", obj = "obj",
|
||||
raw = "raw", c = "c", cc = "c", h = "h", o = "obj", obj = "obj",
|
||||
}
|
||||
|
||||
local map_arch = {
|
||||
@@ -456,18 +469,18 @@ typedef struct {
|
||||
uint32_t value;
|
||||
} mach_nlist;
|
||||
typedef struct {
|
||||
uint32_t strx;
|
||||
int32_t strx;
|
||||
uint8_t type, sect;
|
||||
uint16_t desc;
|
||||
uint64_t value;
|
||||
} mach_nlist_64;
|
||||
typedef struct
|
||||
{
|
||||
uint32_t magic, nfat_arch;
|
||||
int32_t magic, nfat_arch;
|
||||
} mach_fat_header;
|
||||
typedef struct
|
||||
{
|
||||
uint32_t cputype, cpusubtype, offset, size, align;
|
||||
int32_t cputype, cpusubtype, offset, size, align;
|
||||
} mach_fat_arch;
|
||||
typedef struct {
|
||||
struct {
|
||||
@@ -501,6 +514,18 @@ typedef struct {
|
||||
mach_nlist sym_entry;
|
||||
uint8_t space[4096];
|
||||
} mach_fat_obj;
|
||||
typedef struct {
|
||||
mach_fat_header fat;
|
||||
mach_fat_arch fat_arch[2];
|
||||
struct {
|
||||
mach_header_64 hdr;
|
||||
mach_segment_command_64 seg;
|
||||
mach_section_64 sec;
|
||||
mach_symtab_command sym;
|
||||
} arch[2];
|
||||
mach_nlist_64 sym_entry;
|
||||
uint8_t space[4096];
|
||||
} mach_fat_obj_64;
|
||||
]]
|
||||
local symname = '_'..LJBC_PREFIX..ctx.modname
|
||||
local isfat, is64, align, mobj = false, false, 4, "mach_obj"
|
||||
@@ -509,7 +534,7 @@ typedef struct {
|
||||
elseif ctx.arch == "arm" then
|
||||
isfat, mobj = true, "mach_fat_obj"
|
||||
elseif ctx.arch == "arm64" then
|
||||
is64, align, isfat, mobj = true, 8, true, "mach_fat_obj"
|
||||
is64, align, isfat, mobj = true, 8, true, "mach_fat_obj_64"
|
||||
else
|
||||
check(ctx.arch == "x86", "unsupported architecture for OSX")
|
||||
end
|
||||
@@ -592,13 +617,13 @@ end
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
local function bclist(input, output)
|
||||
local f = readfile(input)
|
||||
local function bclist(ctx, input, output)
|
||||
local f = readfile(ctx, input)
|
||||
require("jit.bc").dump(f, savefile(output, "w"), true)
|
||||
end
|
||||
|
||||
local function bcsave(ctx, input, output)
|
||||
local f = readfile(input)
|
||||
local f = readfile(ctx, input)
|
||||
local s = string.dump(f, ctx.strip)
|
||||
local t = ctx.type
|
||||
if not t then
|
||||
@@ -651,6 +676,8 @@ local function docmd(...)
|
||||
ctx.arch = checkarg(tremove(arg, n), map_arch, "architecture")
|
||||
elseif opt == "o" then
|
||||
ctx.os = checkarg(tremove(arg, n), map_os, "OS name")
|
||||
elseif opt == "F" then
|
||||
ctx.filename = "@"..tremove(arg, n)
|
||||
else
|
||||
usage()
|
||||
end
|
||||
@@ -662,7 +689,7 @@ local function docmd(...)
|
||||
end
|
||||
if list then
|
||||
if #arg == 0 or #arg > 2 then usage() end
|
||||
bclist(arg[1], arg[2] or "-")
|
||||
bclist(ctx, arg[1], arg[2] or "-")
|
||||
else
|
||||
if #arg ~= 2 then usage() end
|
||||
bcsave(ctx, arg[1], arg[2])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT ARM disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT ARM64 disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
--
|
||||
-- Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com.
|
||||
@@ -107,24 +107,20 @@ local map_logsr = { -- Logical, shifted register.
|
||||
[0] = {
|
||||
shift = 29, mask = 3,
|
||||
[0] = {
|
||||
shift = 21, mask = 7,
|
||||
[0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg",
|
||||
"andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "andDNMSg", "bicDNMSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] ="orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg",
|
||||
"orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg",
|
||||
"eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "eorDNMSg", "eonDNMSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg",
|
||||
"ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "ands|tstD0NMSg", "bicsDNMSg"
|
||||
}
|
||||
},
|
||||
false -- unallocated
|
||||
@@ -132,24 +128,20 @@ local map_logsr = { -- Logical, shifted register.
|
||||
{
|
||||
shift = 29, mask = 3,
|
||||
[0] = {
|
||||
shift = 21, mask = 7,
|
||||
[0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg",
|
||||
"andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "andDNMSg", "bicDNMSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg",
|
||||
"orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg",
|
||||
"eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "eorDNMSg", "eonDNMSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg",
|
||||
"ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "ands|tstD0NMSg", "bicsDNMSg"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -735,7 +727,7 @@ local map_cond = {
|
||||
"hi", "ls", "ge", "lt", "gt", "le", "al",
|
||||
}
|
||||
|
||||
local map_shift = { [0] = "lsl", "lsr", "asr", }
|
||||
local map_shift = { [0] = "lsl", "lsr", "asr", "ror"}
|
||||
|
||||
local map_extend = {
|
||||
[0] = "uxtb", "uxth", "uxtw", "uxtx", "sxtb", "sxth", "sxtw", "sxtx",
|
||||
@@ -956,7 +948,7 @@ local function disass_ins(ctx)
|
||||
elseif p == "U" then
|
||||
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
||||
local sz = band(rshift(op, 30), 3)
|
||||
local imm12 = lshift(arshift(lshift(op, 10), 20), sz)
|
||||
local imm12 = lshift(rshift(lshift(op, 10), 20), sz)
|
||||
if imm12 ~= 0 then
|
||||
x = "["..rn..", #"..imm12.."]"
|
||||
else
|
||||
@@ -993,8 +985,7 @@ local function disass_ins(ctx)
|
||||
x = x.."]"
|
||||
end
|
||||
elseif p == "P" then
|
||||
local opcv, sh = rshift(op, 26), 2
|
||||
if opcv >= 0x2a then sh = 4 elseif opcv >= 0x1b then sh = 3 end
|
||||
local sh = 2 + rshift(op, 31 - band(rshift(op, 26), 1))
|
||||
local imm7 = lshift(arshift(lshift(op, 10), 25), sh)
|
||||
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
||||
local ind = band(rshift(op, 23), 3)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT ARM64BE disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- ARM64 instructions are always little-endian. So just forward to the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT/X license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS64 disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the big-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS64EL disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the little-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS64R6 disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the r6 big-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS64R6EL disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the r6 little-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPSEL disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the little-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT PPC disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT/X license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT x64 disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the 64 bit functions from the combined
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT x86/x64 disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT compiler dump module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -55,7 +55,6 @@
|
||||
|
||||
-- Cache some library functions and objects.
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
local jutil = require("jit.util")
|
||||
local vmdef = require("jit.vmdef")
|
||||
local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT profiler.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -41,7 +41,6 @@
|
||||
|
||||
-- Cache some library functions and objects.
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
local profile = require("jit.profile")
|
||||
local vmdef = require("jit.vmdef")
|
||||
local math = math
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- Verbose mode of the LuaJIT compiler.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -59,7 +59,6 @@
|
||||
|
||||
-- Cache some library functions and objects.
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
local jutil = require("jit.util")
|
||||
local vmdef = require("jit.vmdef")
|
||||
local funcinfo, traceinfo = jutil.funcinfo, jutil.traceinfo
|
||||
|
||||
@@ -1,395 +1,396 @@
|
||||
-- This is a generated file. DO NOT EDIT!
|
||||
|
||||
return {
|
||||
|
||||
bcnames = "ISLT ISGE ISLE ISGT ISEQV ISNEV ISEQS ISNES ISEQN ISNEN ISEQP ISNEP ISTC ISFC IST ISF ISTYPEISNUM MOV NOT UNM LEN ADDVN SUBVN MULVN DIVVN MODVN ADDNV SUBNV MULNV DIVNV MODNV ADDVV SUBVV MULVV DIVVV MODVV POW CAT KSTR KCDATAKSHORTKNUM KPRI KNIL UGET USETV USETS USETN USETP UCLO FNEW TNEW TDUP GGET GSET TGETV TGETS TGETB TGETR TSETV TSETS TSETB TSETM TSETR CALLM CALL CALLMTCALLT ITERC ITERN VARG ISNEXTRETM RET RET0 RET1 FORI JFORI FORL IFORL JFORL ITERL IITERLJITERLLOOP ILOOP JLOOP JMP FUNCF IFUNCFJFUNCFFUNCV IFUNCVJFUNCVFUNCC FUNCCW",
|
||||
|
||||
irnames = "LT GE LE GT ULT UGE ULE UGT EQ NE ABC RETF NOP BASE PVAL GCSTEPHIOP LOOP USE PHI RENAMEPROF KPRI KINT KGC KPTR KKPTR KNULL KNUM KINT64KSLOT BNOT BSWAP BAND BOR BXOR BSHL BSHR BSAR BROL BROR ADD SUB MUL DIV MOD POW NEG ABS LDEXP MIN MAX FPMATHADDOV SUBOV MULOV AREF HREFK HREF NEWREFUREFO UREFC FREF TMPREFSTRREFLREF ALOAD HLOAD ULOAD FLOAD XLOAD SLOAD VLOAD ALEN ASTOREHSTOREUSTOREFSTOREXSTORESNEW XSNEW TNEW TDUP CNEW CNEWI BUFHDRBUFPUTBUFSTRTBAR OBAR XBAR CONV TOBIT TOSTR STRTO CALLN CALLA CALLL CALLS CALLXSCARG ",
|
||||
|
||||
irfpm = { [0]="floor", "ceil", "trunc", "sqrt", "log", "log2", "other", },
|
||||
|
||||
irfield = { [0]="str.len", "func.env", "func.pc", "func.ffid", "thread.env", "tab.meta", "tab.array", "tab.node", "tab.asize", "tab.hmask", "tab.nomm", "udata.meta", "udata.udtype", "udata.file", "sbuf.w", "sbuf.e", "sbuf.b", "sbuf.l", "sbuf.ref", "sbuf.r", "cdata.ctypeid", "cdata.ptr", "cdata.int", "cdata.int64", "cdata.int64_4", },
|
||||
|
||||
ircall = {
|
||||
[0]="lj_str_cmp",
|
||||
"lj_str_find",
|
||||
"lj_str_new",
|
||||
"lj_strscan_num",
|
||||
"lj_strfmt_int",
|
||||
"lj_strfmt_num",
|
||||
"lj_strfmt_char",
|
||||
"lj_strfmt_putint",
|
||||
"lj_strfmt_putnum",
|
||||
"lj_strfmt_putquoted",
|
||||
"lj_strfmt_putfxint",
|
||||
"lj_strfmt_putfnum_int",
|
||||
"lj_strfmt_putfnum_uint",
|
||||
"lj_strfmt_putfnum",
|
||||
"lj_strfmt_putfstr",
|
||||
"lj_strfmt_putfchar",
|
||||
"lj_buf_putmem",
|
||||
"lj_buf_putstr",
|
||||
"lj_buf_putchar",
|
||||
"lj_buf_putstr_reverse",
|
||||
"lj_buf_putstr_lower",
|
||||
"lj_buf_putstr_upper",
|
||||
"lj_buf_putstr_rep",
|
||||
"lj_buf_puttab",
|
||||
"lj_bufx_set",
|
||||
"lj_bufx_more",
|
||||
"lj_serialize_put",
|
||||
"lj_serialize_get",
|
||||
"lj_serialize_encode",
|
||||
"lj_serialize_decode",
|
||||
"lj_buf_tostr",
|
||||
"lj_tab_new_ah",
|
||||
"lj_tab_new1",
|
||||
"lj_tab_dup",
|
||||
"lj_tab_clear",
|
||||
"lj_tab_newkey",
|
||||
"lj_tab_keyindex",
|
||||
"lj_vm_next",
|
||||
"lj_tab_len",
|
||||
"lj_tab_len_hint",
|
||||
"lj_gc_step_jit",
|
||||
"lj_gc_barrieruv",
|
||||
"lj_mem_newgco",
|
||||
"lj_prng_u64d",
|
||||
"lj_vm_modi",
|
||||
"log10",
|
||||
"exp",
|
||||
"sin",
|
||||
"cos",
|
||||
"tan",
|
||||
"asin",
|
||||
"acos",
|
||||
"atan",
|
||||
"sinh",
|
||||
"cosh",
|
||||
"tanh",
|
||||
"fputc",
|
||||
"fwrite",
|
||||
"fflush",
|
||||
"lj_vm_floor",
|
||||
"lj_vm_ceil",
|
||||
"lj_vm_trunc",
|
||||
"sqrt",
|
||||
"log",
|
||||
"lj_vm_log2",
|
||||
"lj_vm_powi",
|
||||
"pow",
|
||||
"atan2",
|
||||
"ldexp",
|
||||
"lj_vm_tobit",
|
||||
"softfp_add",
|
||||
"softfp_sub",
|
||||
"softfp_mul",
|
||||
"softfp_div",
|
||||
"softfp_cmp",
|
||||
"softfp_i2d",
|
||||
"softfp_d2i",
|
||||
"lj_vm_sfmin",
|
||||
"lj_vm_sfmax",
|
||||
"lj_vm_tointg",
|
||||
"softfp_ui2d",
|
||||
"softfp_f2d",
|
||||
"softfp_d2ui",
|
||||
"softfp_d2f",
|
||||
"softfp_i2f",
|
||||
"softfp_ui2f",
|
||||
"softfp_f2i",
|
||||
"softfp_f2ui",
|
||||
"fp64_l2d",
|
||||
"fp64_ul2d",
|
||||
"fp64_l2f",
|
||||
"fp64_ul2f",
|
||||
"fp64_d2l",
|
||||
"fp64_d2ul",
|
||||
"fp64_f2l",
|
||||
"fp64_f2ul",
|
||||
"lj_carith_divi64",
|
||||
"lj_carith_divu64",
|
||||
"lj_carith_modi64",
|
||||
"lj_carith_modu64",
|
||||
"lj_carith_powi64",
|
||||
"lj_carith_powu64",
|
||||
"lj_cdata_newv",
|
||||
"lj_cdata_setfin",
|
||||
"strlen",
|
||||
"memcpy",
|
||||
"memset",
|
||||
"lj_vm_errno",
|
||||
"lj_carith_mul64",
|
||||
"lj_carith_shl64",
|
||||
"lj_carith_shr64",
|
||||
"lj_carith_sar64",
|
||||
"lj_carith_rol64",
|
||||
"lj_carith_ror64",
|
||||
},
|
||||
|
||||
traceerr = {
|
||||
[0]="error thrown or hook called during recording",
|
||||
"trace too short",
|
||||
"trace too long",
|
||||
"trace too deep",
|
||||
"too many snapshots",
|
||||
"blacklisted",
|
||||
"retry recording",
|
||||
"NYI: bytecode %d",
|
||||
"leaving loop in root trace",
|
||||
"inner loop in root trace",
|
||||
"loop unroll limit reached",
|
||||
"bad argument type",
|
||||
"JIT compilation disabled for function",
|
||||
"call unroll limit reached",
|
||||
"down-recursion, restarting",
|
||||
"NYI: unsupported variant of FastFunc %s",
|
||||
"NYI: return to lower frame",
|
||||
"store with nil or NaN key",
|
||||
"missing metamethod",
|
||||
"looping index lookup",
|
||||
"NYI: mixed sparse/dense table",
|
||||
"symbol not in cache",
|
||||
"NYI: unsupported C type conversion",
|
||||
"NYI: unsupported C function type",
|
||||
"guard would always fail",
|
||||
"too many PHIs",
|
||||
"persistent type instability",
|
||||
"failed to allocate mcode memory",
|
||||
"machine code too long",
|
||||
"hit mcode limit (retrying)",
|
||||
"too many spill slots",
|
||||
"inconsistent register allocation",
|
||||
"NYI: cannot assemble IR instruction %d",
|
||||
"NYI: PHI shuffling too complex",
|
||||
"NYI: register coalescing too complex",
|
||||
},
|
||||
|
||||
ffnames = {
|
||||
[0]="Lua",
|
||||
"C",
|
||||
"assert",
|
||||
"type",
|
||||
"next",
|
||||
"pairs",
|
||||
"ipairs_aux",
|
||||
"ipairs",
|
||||
"getmetatable",
|
||||
"setmetatable",
|
||||
"getfenv",
|
||||
"setfenv",
|
||||
"rawget",
|
||||
"rawset",
|
||||
"rawequal",
|
||||
"unpack",
|
||||
"select",
|
||||
"tonumber",
|
||||
"tostring",
|
||||
"error",
|
||||
"pcall",
|
||||
"xpcall",
|
||||
"loadfile",
|
||||
"load",
|
||||
"loadstring",
|
||||
"dofile",
|
||||
"gcinfo",
|
||||
"collectgarbage",
|
||||
"newproxy",
|
||||
"print",
|
||||
"coroutine.status",
|
||||
"coroutine.running",
|
||||
"coroutine.isyieldable",
|
||||
"coroutine.create",
|
||||
"coroutine.yield",
|
||||
"coroutine.resume",
|
||||
"coroutine.wrap_aux",
|
||||
"coroutine.wrap",
|
||||
"math.abs",
|
||||
"math.floor",
|
||||
"math.ceil",
|
||||
"math.sqrt",
|
||||
"math.log10",
|
||||
"math.exp",
|
||||
"math.sin",
|
||||
"math.cos",
|
||||
"math.tan",
|
||||
"math.asin",
|
||||
"math.acos",
|
||||
"math.atan",
|
||||
"math.sinh",
|
||||
"math.cosh",
|
||||
"math.tanh",
|
||||
"math.frexp",
|
||||
"math.modf",
|
||||
"math.log",
|
||||
"math.atan2",
|
||||
"math.pow",
|
||||
"math.fmod",
|
||||
"math.ldexp",
|
||||
"math.min",
|
||||
"math.max",
|
||||
"math.random",
|
||||
"math.randomseed",
|
||||
"bit.tobit",
|
||||
"bit.bnot",
|
||||
"bit.bswap",
|
||||
"bit.lshift",
|
||||
"bit.rshift",
|
||||
"bit.arshift",
|
||||
"bit.rol",
|
||||
"bit.ror",
|
||||
"bit.band",
|
||||
"bit.bor",
|
||||
"bit.bxor",
|
||||
"bit.tohex",
|
||||
"string.byte",
|
||||
"string.char",
|
||||
"string.sub",
|
||||
"string.rep",
|
||||
"string.reverse",
|
||||
"string.lower",
|
||||
"string.upper",
|
||||
"string.dump",
|
||||
"string.find",
|
||||
"string.match",
|
||||
"string.gmatch_aux",
|
||||
"string.gmatch",
|
||||
"string.gsub",
|
||||
"string.format",
|
||||
"table.maxn",
|
||||
"table.insert",
|
||||
"table.concat",
|
||||
"table.sort",
|
||||
"table.new",
|
||||
"table.clear",
|
||||
"io.method.close",
|
||||
"io.method.read",
|
||||
"io.method.write",
|
||||
"io.method.flush",
|
||||
"io.method.seek",
|
||||
"io.method.setvbuf",
|
||||
"io.method.lines",
|
||||
"io.method.__gc",
|
||||
"io.method.__tostring",
|
||||
"io.open",
|
||||
"io.popen",
|
||||
"io.tmpfile",
|
||||
"io.close",
|
||||
"io.read",
|
||||
"io.write",
|
||||
"io.flush",
|
||||
"io.input",
|
||||
"io.output",
|
||||
"io.lines",
|
||||
"io.type",
|
||||
"os.execute",
|
||||
"os.remove",
|
||||
"os.rename",
|
||||
"os.tmpname",
|
||||
"os.getenv",
|
||||
"os.exit",
|
||||
"os.clock",
|
||||
"os.date",
|
||||
"os.time",
|
||||
"os.difftime",
|
||||
"os.setlocale",
|
||||
"debug.getregistry",
|
||||
"debug.getmetatable",
|
||||
"debug.setmetatable",
|
||||
"debug.getfenv",
|
||||
"debug.setfenv",
|
||||
"debug.getinfo",
|
||||
"debug.getlocal",
|
||||
"debug.setlocal",
|
||||
"debug.getupvalue",
|
||||
"debug.setupvalue",
|
||||
"debug.upvalueid",
|
||||
"debug.upvaluejoin",
|
||||
"debug.sethook",
|
||||
"debug.gethook",
|
||||
"debug.debug",
|
||||
"debug.traceback",
|
||||
"jit.on",
|
||||
"jit.off",
|
||||
"jit.flush",
|
||||
"jit.status",
|
||||
"jit.security",
|
||||
"jit.attach",
|
||||
"jit.util.funcinfo",
|
||||
"jit.util.funcbc",
|
||||
"jit.util.funck",
|
||||
"jit.util.funcuvname",
|
||||
"jit.util.traceinfo",
|
||||
"jit.util.traceir",
|
||||
"jit.util.tracek",
|
||||
"jit.util.tracesnap",
|
||||
"jit.util.tracemc",
|
||||
"jit.util.traceexitstub",
|
||||
"jit.util.ircalladdr",
|
||||
"jit.opt.start",
|
||||
"jit.profile.start",
|
||||
"jit.profile.stop",
|
||||
"jit.profile.dumpstack",
|
||||
"ffi.meta.__index",
|
||||
"ffi.meta.__newindex",
|
||||
"ffi.meta.__eq",
|
||||
"ffi.meta.__len",
|
||||
"ffi.meta.__lt",
|
||||
"ffi.meta.__le",
|
||||
"ffi.meta.__concat",
|
||||
"ffi.meta.__call",
|
||||
"ffi.meta.__add",
|
||||
"ffi.meta.__sub",
|
||||
"ffi.meta.__mul",
|
||||
"ffi.meta.__div",
|
||||
"ffi.meta.__mod",
|
||||
"ffi.meta.__pow",
|
||||
"ffi.meta.__unm",
|
||||
"ffi.meta.__tostring",
|
||||
"ffi.meta.__pairs",
|
||||
"ffi.meta.__ipairs",
|
||||
"ffi.clib.__index",
|
||||
"ffi.clib.__newindex",
|
||||
"ffi.clib.__gc",
|
||||
"ffi.callback.free",
|
||||
"ffi.callback.set",
|
||||
"ffi.cdef",
|
||||
"ffi.new",
|
||||
"ffi.cast",
|
||||
"ffi.typeof",
|
||||
"ffi.typeinfo",
|
||||
"ffi.istype",
|
||||
"ffi.sizeof",
|
||||
"ffi.alignof",
|
||||
"ffi.offsetof",
|
||||
"ffi.errno",
|
||||
"ffi.string",
|
||||
"ffi.copy",
|
||||
"ffi.fill",
|
||||
"ffi.abi",
|
||||
"ffi.metatype",
|
||||
"ffi.gc",
|
||||
"ffi.load",
|
||||
"buffer.method.free",
|
||||
"buffer.method.reset",
|
||||
"buffer.method.skip",
|
||||
"buffer.method.set",
|
||||
"buffer.method.put",
|
||||
"buffer.method.putf",
|
||||
"buffer.method.get",
|
||||
"buffer.method.putcdata",
|
||||
"buffer.method.reserve",
|
||||
"buffer.method.commit",
|
||||
"buffer.method.ref",
|
||||
"buffer.method.encode",
|
||||
"buffer.method.decode",
|
||||
"buffer.method.__gc",
|
||||
"buffer.method.__tostring",
|
||||
"buffer.method.__len",
|
||||
"buffer.new",
|
||||
"buffer.encode",
|
||||
"buffer.decode",
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
-- This is a generated file. DO NOT EDIT!
|
||||
|
||||
assert(require("jit").version == "LuaJIT 2.1.1700008891", "LuaJIT core/library version mismatch")
|
||||
|
||||
return {
|
||||
|
||||
bcnames = "ISLT ISGE ISLE ISGT ISEQV ISNEV ISEQS ISNES ISEQN ISNEN ISEQP ISNEP ISTC ISFC IST ISF ISTYPEISNUM MOV NOT UNM LEN ADDVN SUBVN MULVN DIVVN MODVN ADDNV SUBNV MULNV DIVNV MODNV ADDVV SUBVV MULVV DIVVV MODVV POW CAT KSTR KCDATAKSHORTKNUM KPRI KNIL UGET USETV USETS USETN USETP UCLO FNEW TNEW TDUP GGET GSET TGETV TGETS TGETB TGETR TSETV TSETS TSETB TSETM TSETR CALLM CALL CALLMTCALLT ITERC ITERN VARG ISNEXTRETM RET RET0 RET1 FORI JFORI FORL IFORL JFORL ITERL IITERLJITERLLOOP ILOOP JLOOP JMP FUNCF IFUNCFJFUNCFFUNCV IFUNCVJFUNCVFUNCC FUNCCW",
|
||||
|
||||
irnames = "LT GE LE GT ULT UGE ULE UGT EQ NE ABC RETF NOP BASE PVAL GCSTEPHIOP LOOP USE PHI RENAMEPROF KPRI KINT KGC KPTR KKPTR KNULL KNUM KINT64KSLOT BNOT BSWAP BAND BOR BXOR BSHL BSHR BSAR BROL BROR ADD SUB MUL DIV MOD POW NEG ABS LDEXP MIN MAX FPMATHADDOV SUBOV MULOV AREF HREFK HREF NEWREFUREFO UREFC FREF TMPREFSTRREFLREF ALOAD HLOAD ULOAD FLOAD XLOAD SLOAD VLOAD ALEN ASTOREHSTOREUSTOREFSTOREXSTORESNEW XSNEW TNEW TDUP CNEW CNEWI BUFHDRBUFPUTBUFSTRTBAR OBAR XBAR CONV TOBIT TOSTR STRTO CALLN CALLA CALLL CALLS CALLXSCARG ",
|
||||
|
||||
irfpm = { [0]="floor", "ceil", "trunc", "sqrt", "log", "log2", "other", },
|
||||
|
||||
irfield = { [0]="str.len", "func.env", "func.pc", "func.ffid", "thread.env", "tab.meta", "tab.array", "tab.node", "tab.asize", "tab.hmask", "tab.nomm", "udata.meta", "udata.udtype", "udata.file", "sbuf.w", "sbuf.e", "sbuf.b", "sbuf.l", "sbuf.ref", "sbuf.r", "cdata.ctypeid", "cdata.ptr", "cdata.int", "cdata.int64", "cdata.int64_4", },
|
||||
|
||||
ircall = {
|
||||
[0]="lj_str_cmp",
|
||||
"lj_str_find",
|
||||
"lj_str_new",
|
||||
"lj_strscan_num",
|
||||
"lj_strfmt_int",
|
||||
"lj_strfmt_num",
|
||||
"lj_strfmt_char",
|
||||
"lj_strfmt_putint",
|
||||
"lj_strfmt_putnum",
|
||||
"lj_strfmt_putquoted",
|
||||
"lj_strfmt_putfxint",
|
||||
"lj_strfmt_putfnum_int",
|
||||
"lj_strfmt_putfnum_uint",
|
||||
"lj_strfmt_putfnum",
|
||||
"lj_strfmt_putfstr",
|
||||
"lj_strfmt_putfchar",
|
||||
"lj_buf_putmem",
|
||||
"lj_buf_putstr",
|
||||
"lj_buf_putchar",
|
||||
"lj_buf_putstr_reverse",
|
||||
"lj_buf_putstr_lower",
|
||||
"lj_buf_putstr_upper",
|
||||
"lj_buf_putstr_rep",
|
||||
"lj_buf_puttab",
|
||||
"lj_bufx_set",
|
||||
"lj_bufx_more",
|
||||
"lj_serialize_put",
|
||||
"lj_serialize_get",
|
||||
"lj_serialize_encode",
|
||||
"lj_serialize_decode",
|
||||
"lj_buf_tostr",
|
||||
"lj_tab_new_ah",
|
||||
"lj_tab_new1",
|
||||
"lj_tab_dup",
|
||||
"lj_tab_clear",
|
||||
"lj_tab_newkey",
|
||||
"lj_tab_keyindex",
|
||||
"lj_vm_next",
|
||||
"lj_tab_len",
|
||||
"lj_tab_len_hint",
|
||||
"lj_gc_step_jit",
|
||||
"lj_gc_barrieruv",
|
||||
"lj_mem_newgco",
|
||||
"lj_prng_u64d",
|
||||
"lj_vm_modi",
|
||||
"log10",
|
||||
"exp",
|
||||
"sin",
|
||||
"cos",
|
||||
"tan",
|
||||
"asin",
|
||||
"acos",
|
||||
"atan",
|
||||
"sinh",
|
||||
"cosh",
|
||||
"tanh",
|
||||
"fputc",
|
||||
"fwrite",
|
||||
"fflush",
|
||||
"lj_vm_floor",
|
||||
"lj_vm_ceil",
|
||||
"lj_vm_trunc",
|
||||
"sqrt",
|
||||
"log",
|
||||
"lj_vm_log2",
|
||||
"pow",
|
||||
"atan2",
|
||||
"ldexp",
|
||||
"lj_vm_tobit",
|
||||
"softfp_add",
|
||||
"softfp_sub",
|
||||
"softfp_mul",
|
||||
"softfp_div",
|
||||
"softfp_cmp",
|
||||
"softfp_i2d",
|
||||
"softfp_d2i",
|
||||
"lj_vm_sfmin",
|
||||
"lj_vm_sfmax",
|
||||
"lj_vm_tointg",
|
||||
"softfp_ui2d",
|
||||
"softfp_f2d",
|
||||
"softfp_d2ui",
|
||||
"softfp_d2f",
|
||||
"softfp_i2f",
|
||||
"softfp_ui2f",
|
||||
"softfp_f2i",
|
||||
"softfp_f2ui",
|
||||
"fp64_l2d",
|
||||
"fp64_ul2d",
|
||||
"fp64_l2f",
|
||||
"fp64_ul2f",
|
||||
"fp64_d2l",
|
||||
"fp64_d2ul",
|
||||
"fp64_f2l",
|
||||
"fp64_f2ul",
|
||||
"lj_carith_divi64",
|
||||
"lj_carith_divu64",
|
||||
"lj_carith_modi64",
|
||||
"lj_carith_modu64",
|
||||
"lj_carith_powi64",
|
||||
"lj_carith_powu64",
|
||||
"lj_cdata_newv",
|
||||
"lj_cdata_setfin",
|
||||
"strlen",
|
||||
"memcpy",
|
||||
"memset",
|
||||
"lj_vm_errno",
|
||||
"lj_carith_mul64",
|
||||
"lj_carith_shl64",
|
||||
"lj_carith_shr64",
|
||||
"lj_carith_sar64",
|
||||
"lj_carith_rol64",
|
||||
"lj_carith_ror64",
|
||||
},
|
||||
|
||||
traceerr = {
|
||||
[0]="error thrown or hook called during recording",
|
||||
"trace too short",
|
||||
"trace too long",
|
||||
"trace too deep",
|
||||
"too many snapshots",
|
||||
"blacklisted",
|
||||
"retry recording",
|
||||
"NYI: bytecode %d",
|
||||
"leaving loop in root trace",
|
||||
"inner loop in root trace",
|
||||
"loop unroll limit reached",
|
||||
"bad argument type",
|
||||
"JIT compilation disabled for function",
|
||||
"call unroll limit reached",
|
||||
"down-recursion, restarting",
|
||||
"NYI: unsupported variant of FastFunc %s",
|
||||
"NYI: return to lower frame",
|
||||
"store with nil or NaN key",
|
||||
"missing metamethod",
|
||||
"looping index lookup",
|
||||
"NYI: mixed sparse/dense table",
|
||||
"symbol not in cache",
|
||||
"NYI: unsupported C type conversion",
|
||||
"NYI: unsupported C function type",
|
||||
"guard would always fail",
|
||||
"too many PHIs",
|
||||
"persistent type instability",
|
||||
"failed to allocate mcode memory",
|
||||
"machine code too long",
|
||||
"hit mcode limit (retrying)",
|
||||
"too many spill slots",
|
||||
"inconsistent register allocation",
|
||||
"NYI: cannot assemble IR instruction %d",
|
||||
"NYI: PHI shuffling too complex",
|
||||
"NYI: register coalescing too complex",
|
||||
},
|
||||
|
||||
ffnames = {
|
||||
[0]="Lua",
|
||||
"C",
|
||||
"assert",
|
||||
"type",
|
||||
"next",
|
||||
"pairs",
|
||||
"ipairs_aux",
|
||||
"ipairs",
|
||||
"getmetatable",
|
||||
"setmetatable",
|
||||
"getfenv",
|
||||
"setfenv",
|
||||
"rawget",
|
||||
"rawset",
|
||||
"rawequal",
|
||||
"unpack",
|
||||
"select",
|
||||
"tonumber",
|
||||
"tostring",
|
||||
"error",
|
||||
"pcall",
|
||||
"xpcall",
|
||||
"loadfile",
|
||||
"load",
|
||||
"loadstring",
|
||||
"dofile",
|
||||
"gcinfo",
|
||||
"collectgarbage",
|
||||
"newproxy",
|
||||
"print",
|
||||
"coroutine.status",
|
||||
"coroutine.running",
|
||||
"coroutine.isyieldable",
|
||||
"coroutine.create",
|
||||
"coroutine.yield",
|
||||
"coroutine.resume",
|
||||
"coroutine.wrap_aux",
|
||||
"coroutine.wrap",
|
||||
"math.abs",
|
||||
"math.floor",
|
||||
"math.ceil",
|
||||
"math.sqrt",
|
||||
"math.log10",
|
||||
"math.exp",
|
||||
"math.sin",
|
||||
"math.cos",
|
||||
"math.tan",
|
||||
"math.asin",
|
||||
"math.acos",
|
||||
"math.atan",
|
||||
"math.sinh",
|
||||
"math.cosh",
|
||||
"math.tanh",
|
||||
"math.frexp",
|
||||
"math.modf",
|
||||
"math.log",
|
||||
"math.atan2",
|
||||
"math.pow",
|
||||
"math.fmod",
|
||||
"math.ldexp",
|
||||
"math.min",
|
||||
"math.max",
|
||||
"math.random",
|
||||
"math.randomseed",
|
||||
"bit.tobit",
|
||||
"bit.bnot",
|
||||
"bit.bswap",
|
||||
"bit.lshift",
|
||||
"bit.rshift",
|
||||
"bit.arshift",
|
||||
"bit.rol",
|
||||
"bit.ror",
|
||||
"bit.band",
|
||||
"bit.bor",
|
||||
"bit.bxor",
|
||||
"bit.tohex",
|
||||
"string.byte",
|
||||
"string.char",
|
||||
"string.sub",
|
||||
"string.rep",
|
||||
"string.reverse",
|
||||
"string.lower",
|
||||
"string.upper",
|
||||
"string.dump",
|
||||
"string.find",
|
||||
"string.match",
|
||||
"string.gmatch_aux",
|
||||
"string.gmatch",
|
||||
"string.gsub",
|
||||
"string.format",
|
||||
"table.maxn",
|
||||
"table.insert",
|
||||
"table.concat",
|
||||
"table.sort",
|
||||
"table.new",
|
||||
"table.clear",
|
||||
"io.method.close",
|
||||
"io.method.read",
|
||||
"io.method.write",
|
||||
"io.method.flush",
|
||||
"io.method.seek",
|
||||
"io.method.setvbuf",
|
||||
"io.method.lines",
|
||||
"io.method.__gc",
|
||||
"io.method.__tostring",
|
||||
"io.open",
|
||||
"io.popen",
|
||||
"io.tmpfile",
|
||||
"io.close",
|
||||
"io.read",
|
||||
"io.write",
|
||||
"io.flush",
|
||||
"io.input",
|
||||
"io.output",
|
||||
"io.lines",
|
||||
"io.type",
|
||||
"os.execute",
|
||||
"os.remove",
|
||||
"os.rename",
|
||||
"os.tmpname",
|
||||
"os.getenv",
|
||||
"os.exit",
|
||||
"os.clock",
|
||||
"os.date",
|
||||
"os.time",
|
||||
"os.difftime",
|
||||
"os.setlocale",
|
||||
"debug.getregistry",
|
||||
"debug.getmetatable",
|
||||
"debug.setmetatable",
|
||||
"debug.getfenv",
|
||||
"debug.setfenv",
|
||||
"debug.getinfo",
|
||||
"debug.getlocal",
|
||||
"debug.setlocal",
|
||||
"debug.getupvalue",
|
||||
"debug.setupvalue",
|
||||
"debug.upvalueid",
|
||||
"debug.upvaluejoin",
|
||||
"debug.sethook",
|
||||
"debug.gethook",
|
||||
"debug.debug",
|
||||
"debug.traceback",
|
||||
"jit.on",
|
||||
"jit.off",
|
||||
"jit.flush",
|
||||
"jit.status",
|
||||
"jit.security",
|
||||
"jit.attach",
|
||||
"jit.util.funcinfo",
|
||||
"jit.util.funcbc",
|
||||
"jit.util.funck",
|
||||
"jit.util.funcuvname",
|
||||
"jit.util.traceinfo",
|
||||
"jit.util.traceir",
|
||||
"jit.util.tracek",
|
||||
"jit.util.tracesnap",
|
||||
"jit.util.tracemc",
|
||||
"jit.util.traceexitstub",
|
||||
"jit.util.ircalladdr",
|
||||
"jit.opt.start",
|
||||
"jit.profile.start",
|
||||
"jit.profile.stop",
|
||||
"jit.profile.dumpstack",
|
||||
"ffi.meta.__index",
|
||||
"ffi.meta.__newindex",
|
||||
"ffi.meta.__eq",
|
||||
"ffi.meta.__len",
|
||||
"ffi.meta.__lt",
|
||||
"ffi.meta.__le",
|
||||
"ffi.meta.__concat",
|
||||
"ffi.meta.__call",
|
||||
"ffi.meta.__add",
|
||||
"ffi.meta.__sub",
|
||||
"ffi.meta.__mul",
|
||||
"ffi.meta.__div",
|
||||
"ffi.meta.__mod",
|
||||
"ffi.meta.__pow",
|
||||
"ffi.meta.__unm",
|
||||
"ffi.meta.__tostring",
|
||||
"ffi.meta.__pairs",
|
||||
"ffi.meta.__ipairs",
|
||||
"ffi.clib.__index",
|
||||
"ffi.clib.__newindex",
|
||||
"ffi.clib.__gc",
|
||||
"ffi.callback.free",
|
||||
"ffi.callback.set",
|
||||
"ffi.cdef",
|
||||
"ffi.new",
|
||||
"ffi.cast",
|
||||
"ffi.typeof",
|
||||
"ffi.typeinfo",
|
||||
"ffi.istype",
|
||||
"ffi.sizeof",
|
||||
"ffi.alignof",
|
||||
"ffi.offsetof",
|
||||
"ffi.errno",
|
||||
"ffi.string",
|
||||
"ffi.copy",
|
||||
"ffi.fill",
|
||||
"ffi.abi",
|
||||
"ffi.metatype",
|
||||
"ffi.gc",
|
||||
"ffi.load",
|
||||
"buffer.method.free",
|
||||
"buffer.method.reset",
|
||||
"buffer.method.skip",
|
||||
"buffer.method.set",
|
||||
"buffer.method.put",
|
||||
"buffer.method.putf",
|
||||
"buffer.method.get",
|
||||
"buffer.method.putcdata",
|
||||
"buffer.method.reserve",
|
||||
"buffer.method.commit",
|
||||
"buffer.method.ref",
|
||||
"buffer.method.encode",
|
||||
"buffer.method.decode",
|
||||
"buffer.method.__gc",
|
||||
"buffer.method.__tostring",
|
||||
"buffer.method.__len",
|
||||
"buffer.new",
|
||||
"buffer.encode",
|
||||
"buffer.decode",
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT profiler zones.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
|
||||
Binary file not shown.
+5
-5
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
** LuaJIT -- a Just-In-Time Compiler for Lua. https://luajit.org/
|
||||
**
|
||||
** Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
** Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining
|
||||
** a copy of this software and associated documentation files (the
|
||||
@@ -30,10 +30,10 @@
|
||||
|
||||
#include "lua.h"
|
||||
|
||||
#define LUAJIT_VERSION "LuaJIT 2.1.0-beta3"
|
||||
#define LUAJIT_VERSION_NUM 20100 /* Version 2.1.0 = 02.01.00. */
|
||||
#define LUAJIT_VERSION_SYM luaJIT_version_2_1_0_beta3
|
||||
#define LUAJIT_COPYRIGHT "Copyright (C) 2005-2021 Mike Pall"
|
||||
#define LUAJIT_VERSION "LuaJIT 2.1.1700008891"
|
||||
#define LUAJIT_VERSION_NUM 20199 /* Deprecated. */
|
||||
#define LUAJIT_VERSION_SYM luaJIT_version_2_1_1700008891
|
||||
#define LUAJIT_COPYRIGHT "Copyright (C) 2005-2023 Mike Pall"
|
||||
#define LUAJIT_URL "https://luajit.org/"
|
||||
|
||||
/* Modes for luaJIT_setmode. */
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT bytecode listing module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -41,7 +41,6 @@
|
||||
|
||||
-- Cache some library functions and objects.
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
local jutil = require("jit.util")
|
||||
local vmdef = require("jit.vmdef")
|
||||
local bit = require("bit")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT module to save/list bytecode.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -11,7 +11,7 @@
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
assert(jit.version_num == 20199, "LuaJIT core/library version mismatch")
|
||||
local bit = require("bit")
|
||||
|
||||
-- Symbol name prefix for LuaJIT bytecode.
|
||||
@@ -33,11 +33,12 @@ Save LuaJIT bytecode: luajit -b[options] input output
|
||||
-t type Set output file type (default: auto-detect from output name).
|
||||
-a arch Override architecture for object files (default: native).
|
||||
-o os Override OS for object files (default: native).
|
||||
-F name Override filename (default: input filename).
|
||||
-e chunk Use chunk string as input.
|
||||
-- Stop handling options.
|
||||
- Use stdin as input and/or stdout as output.
|
||||
|
||||
File types: c h obj o raw (default)
|
||||
File types: c cc h obj o raw (default)
|
||||
]]
|
||||
os.exit(1)
|
||||
end
|
||||
@@ -49,10 +50,22 @@ local function check(ok, ...)
|
||||
os.exit(1)
|
||||
end
|
||||
|
||||
local function readfile(input)
|
||||
local function readfile(ctx, input)
|
||||
if type(input) == "function" then return input end
|
||||
if input == "-" then input = nil end
|
||||
return check(loadfile(input))
|
||||
if ctx.filename then
|
||||
local data
|
||||
if input == "-" then
|
||||
data = io.stdin:read("*a")
|
||||
else
|
||||
local fp = assert(io.open(input, "rb"))
|
||||
data = assert(fp:read("*a"))
|
||||
assert(fp:close())
|
||||
end
|
||||
return check(load(data, ctx.filename))
|
||||
else
|
||||
if input == "-" then input = nil end
|
||||
return check(loadfile(input))
|
||||
end
|
||||
end
|
||||
|
||||
local function savefile(name, mode)
|
||||
@@ -68,7 +81,7 @@ end
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
local map_type = {
|
||||
raw = "raw", c = "c", h = "h", o = "obj", obj = "obj",
|
||||
raw = "raw", c = "c", cc = "c", h = "h", o = "obj", obj = "obj",
|
||||
}
|
||||
|
||||
local map_arch = {
|
||||
@@ -456,18 +469,18 @@ typedef struct {
|
||||
uint32_t value;
|
||||
} mach_nlist;
|
||||
typedef struct {
|
||||
uint32_t strx;
|
||||
int32_t strx;
|
||||
uint8_t type, sect;
|
||||
uint16_t desc;
|
||||
uint64_t value;
|
||||
} mach_nlist_64;
|
||||
typedef struct
|
||||
{
|
||||
uint32_t magic, nfat_arch;
|
||||
int32_t magic, nfat_arch;
|
||||
} mach_fat_header;
|
||||
typedef struct
|
||||
{
|
||||
uint32_t cputype, cpusubtype, offset, size, align;
|
||||
int32_t cputype, cpusubtype, offset, size, align;
|
||||
} mach_fat_arch;
|
||||
typedef struct {
|
||||
struct {
|
||||
@@ -501,6 +514,18 @@ typedef struct {
|
||||
mach_nlist sym_entry;
|
||||
uint8_t space[4096];
|
||||
} mach_fat_obj;
|
||||
typedef struct {
|
||||
mach_fat_header fat;
|
||||
mach_fat_arch fat_arch[2];
|
||||
struct {
|
||||
mach_header_64 hdr;
|
||||
mach_segment_command_64 seg;
|
||||
mach_section_64 sec;
|
||||
mach_symtab_command sym;
|
||||
} arch[2];
|
||||
mach_nlist_64 sym_entry;
|
||||
uint8_t space[4096];
|
||||
} mach_fat_obj_64;
|
||||
]]
|
||||
local symname = '_'..LJBC_PREFIX..ctx.modname
|
||||
local isfat, is64, align, mobj = false, false, 4, "mach_obj"
|
||||
@@ -509,7 +534,7 @@ typedef struct {
|
||||
elseif ctx.arch == "arm" then
|
||||
isfat, mobj = true, "mach_fat_obj"
|
||||
elseif ctx.arch == "arm64" then
|
||||
is64, align, isfat, mobj = true, 8, true, "mach_fat_obj"
|
||||
is64, align, isfat, mobj = true, 8, true, "mach_fat_obj_64"
|
||||
else
|
||||
check(ctx.arch == "x86", "unsupported architecture for OSX")
|
||||
end
|
||||
@@ -592,13 +617,13 @@ end
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
local function bclist(input, output)
|
||||
local f = readfile(input)
|
||||
local function bclist(ctx, input, output)
|
||||
local f = readfile(ctx, input)
|
||||
require("jit.bc").dump(f, savefile(output, "w"), true)
|
||||
end
|
||||
|
||||
local function bcsave(ctx, input, output)
|
||||
local f = readfile(input)
|
||||
local f = readfile(ctx, input)
|
||||
local s = string.dump(f, ctx.strip)
|
||||
local t = ctx.type
|
||||
if not t then
|
||||
@@ -651,6 +676,8 @@ local function docmd(...)
|
||||
ctx.arch = checkarg(tremove(arg, n), map_arch, "architecture")
|
||||
elseif opt == "o" then
|
||||
ctx.os = checkarg(tremove(arg, n), map_os, "OS name")
|
||||
elseif opt == "F" then
|
||||
ctx.filename = "@"..tremove(arg, n)
|
||||
else
|
||||
usage()
|
||||
end
|
||||
@@ -662,7 +689,7 @@ local function docmd(...)
|
||||
end
|
||||
if list then
|
||||
if #arg == 0 or #arg > 2 then usage() end
|
||||
bclist(arg[1], arg[2] or "-")
|
||||
bclist(ctx, arg[1], arg[2] or "-")
|
||||
else
|
||||
if #arg ~= 2 then usage() end
|
||||
bcsave(ctx, arg[1], arg[2])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT ARM disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT ARM64 disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
--
|
||||
-- Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com.
|
||||
@@ -107,24 +107,20 @@ local map_logsr = { -- Logical, shifted register.
|
||||
[0] = {
|
||||
shift = 29, mask = 3,
|
||||
[0] = {
|
||||
shift = 21, mask = 7,
|
||||
[0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg",
|
||||
"andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "andDNMSg", "bicDNMSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] ="orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg",
|
||||
"orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg",
|
||||
"eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "eorDNMSg", "eonDNMSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg",
|
||||
"ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "ands|tstD0NMSg", "bicsDNMSg"
|
||||
}
|
||||
},
|
||||
false -- unallocated
|
||||
@@ -132,24 +128,20 @@ local map_logsr = { -- Logical, shifted register.
|
||||
{
|
||||
shift = 29, mask = 3,
|
||||
[0] = {
|
||||
shift = 21, mask = 7,
|
||||
[0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg",
|
||||
"andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "andDNMSg", "bicDNMSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg",
|
||||
"orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg",
|
||||
"eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "eorDNMSg", "eonDNMSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg",
|
||||
"ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "ands|tstD0NMSg", "bicsDNMSg"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -735,7 +727,7 @@ local map_cond = {
|
||||
"hi", "ls", "ge", "lt", "gt", "le", "al",
|
||||
}
|
||||
|
||||
local map_shift = { [0] = "lsl", "lsr", "asr", }
|
||||
local map_shift = { [0] = "lsl", "lsr", "asr", "ror"}
|
||||
|
||||
local map_extend = {
|
||||
[0] = "uxtb", "uxth", "uxtw", "uxtx", "sxtb", "sxth", "sxtw", "sxtx",
|
||||
@@ -956,7 +948,7 @@ local function disass_ins(ctx)
|
||||
elseif p == "U" then
|
||||
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
||||
local sz = band(rshift(op, 30), 3)
|
||||
local imm12 = lshift(arshift(lshift(op, 10), 20), sz)
|
||||
local imm12 = lshift(rshift(lshift(op, 10), 20), sz)
|
||||
if imm12 ~= 0 then
|
||||
x = "["..rn..", #"..imm12.."]"
|
||||
else
|
||||
@@ -993,8 +985,7 @@ local function disass_ins(ctx)
|
||||
x = x.."]"
|
||||
end
|
||||
elseif p == "P" then
|
||||
local opcv, sh = rshift(op, 26), 2
|
||||
if opcv >= 0x2a then sh = 4 elseif opcv >= 0x1b then sh = 3 end
|
||||
local sh = 2 + rshift(op, 31 - band(rshift(op, 26), 1))
|
||||
local imm7 = lshift(arshift(lshift(op, 10), 25), sh)
|
||||
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
||||
local ind = band(rshift(op, 23), 3)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT ARM64BE disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- ARM64 instructions are always little-endian. So just forward to the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT/X license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS64 disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the big-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS64EL disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the little-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS64R6 disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the r6 big-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS64R6EL disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the r6 little-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPSEL disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the little-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT PPC disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT/X license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT x64 disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the 64 bit functions from the combined
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT x86/x64 disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT compiler dump module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -55,7 +55,6 @@
|
||||
|
||||
-- Cache some library functions and objects.
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
local jutil = require("jit.util")
|
||||
local vmdef = require("jit.vmdef")
|
||||
local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT profiler.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -41,7 +41,6 @@
|
||||
|
||||
-- Cache some library functions and objects.
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
local profile = require("jit.profile")
|
||||
local vmdef = require("jit.vmdef")
|
||||
local math = math
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- Verbose mode of the LuaJIT compiler.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -59,7 +59,6 @@
|
||||
|
||||
-- Cache some library functions and objects.
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
local jutil = require("jit.util")
|
||||
local vmdef = require("jit.vmdef")
|
||||
local funcinfo, traceinfo = jutil.funcinfo, jutil.traceinfo
|
||||
|
||||
@@ -1,395 +1,396 @@
|
||||
-- This is a generated file. DO NOT EDIT!
|
||||
|
||||
return {
|
||||
|
||||
bcnames = "ISLT ISGE ISLE ISGT ISEQV ISNEV ISEQS ISNES ISEQN ISNEN ISEQP ISNEP ISTC ISFC IST ISF ISTYPEISNUM MOV NOT UNM LEN ADDVN SUBVN MULVN DIVVN MODVN ADDNV SUBNV MULNV DIVNV MODNV ADDVV SUBVV MULVV DIVVV MODVV POW CAT KSTR KCDATAKSHORTKNUM KPRI KNIL UGET USETV USETS USETN USETP UCLO FNEW TNEW TDUP GGET GSET TGETV TGETS TGETB TGETR TSETV TSETS TSETB TSETM TSETR CALLM CALL CALLMTCALLT ITERC ITERN VARG ISNEXTRETM RET RET0 RET1 FORI JFORI FORL IFORL JFORL ITERL IITERLJITERLLOOP ILOOP JLOOP JMP FUNCF IFUNCFJFUNCFFUNCV IFUNCVJFUNCVFUNCC FUNCCW",
|
||||
|
||||
irnames = "LT GE LE GT ULT UGE ULE UGT EQ NE ABC RETF NOP BASE PVAL GCSTEPHIOP LOOP USE PHI RENAMEPROF KPRI KINT KGC KPTR KKPTR KNULL KNUM KINT64KSLOT BNOT BSWAP BAND BOR BXOR BSHL BSHR BSAR BROL BROR ADD SUB MUL DIV MOD POW NEG ABS LDEXP MIN MAX FPMATHADDOV SUBOV MULOV AREF HREFK HREF NEWREFUREFO UREFC FREF TMPREFSTRREFLREF ALOAD HLOAD ULOAD FLOAD XLOAD SLOAD VLOAD ALEN ASTOREHSTOREUSTOREFSTOREXSTORESNEW XSNEW TNEW TDUP CNEW CNEWI BUFHDRBUFPUTBUFSTRTBAR OBAR XBAR CONV TOBIT TOSTR STRTO CALLN CALLA CALLL CALLS CALLXSCARG ",
|
||||
|
||||
irfpm = { [0]="floor", "ceil", "trunc", "sqrt", "log", "log2", "other", },
|
||||
|
||||
irfield = { [0]="str.len", "func.env", "func.pc", "func.ffid", "thread.env", "tab.meta", "tab.array", "tab.node", "tab.asize", "tab.hmask", "tab.nomm", "udata.meta", "udata.udtype", "udata.file", "sbuf.w", "sbuf.e", "sbuf.b", "sbuf.l", "sbuf.ref", "sbuf.r", "cdata.ctypeid", "cdata.ptr", "cdata.int", "cdata.int64", "cdata.int64_4", },
|
||||
|
||||
ircall = {
|
||||
[0]="lj_str_cmp",
|
||||
"lj_str_find",
|
||||
"lj_str_new",
|
||||
"lj_strscan_num",
|
||||
"lj_strfmt_int",
|
||||
"lj_strfmt_num",
|
||||
"lj_strfmt_char",
|
||||
"lj_strfmt_putint",
|
||||
"lj_strfmt_putnum",
|
||||
"lj_strfmt_putquoted",
|
||||
"lj_strfmt_putfxint",
|
||||
"lj_strfmt_putfnum_int",
|
||||
"lj_strfmt_putfnum_uint",
|
||||
"lj_strfmt_putfnum",
|
||||
"lj_strfmt_putfstr",
|
||||
"lj_strfmt_putfchar",
|
||||
"lj_buf_putmem",
|
||||
"lj_buf_putstr",
|
||||
"lj_buf_putchar",
|
||||
"lj_buf_putstr_reverse",
|
||||
"lj_buf_putstr_lower",
|
||||
"lj_buf_putstr_upper",
|
||||
"lj_buf_putstr_rep",
|
||||
"lj_buf_puttab",
|
||||
"lj_bufx_set",
|
||||
"lj_bufx_more",
|
||||
"lj_serialize_put",
|
||||
"lj_serialize_get",
|
||||
"lj_serialize_encode",
|
||||
"lj_serialize_decode",
|
||||
"lj_buf_tostr",
|
||||
"lj_tab_new_ah",
|
||||
"lj_tab_new1",
|
||||
"lj_tab_dup",
|
||||
"lj_tab_clear",
|
||||
"lj_tab_newkey",
|
||||
"lj_tab_keyindex",
|
||||
"lj_vm_next",
|
||||
"lj_tab_len",
|
||||
"lj_tab_len_hint",
|
||||
"lj_gc_step_jit",
|
||||
"lj_gc_barrieruv",
|
||||
"lj_mem_newgco",
|
||||
"lj_prng_u64d",
|
||||
"lj_vm_modi",
|
||||
"log10",
|
||||
"exp",
|
||||
"sin",
|
||||
"cos",
|
||||
"tan",
|
||||
"asin",
|
||||
"acos",
|
||||
"atan",
|
||||
"sinh",
|
||||
"cosh",
|
||||
"tanh",
|
||||
"fputc",
|
||||
"fwrite",
|
||||
"fflush",
|
||||
"lj_vm_floor",
|
||||
"lj_vm_ceil",
|
||||
"lj_vm_trunc",
|
||||
"sqrt",
|
||||
"log",
|
||||
"lj_vm_log2",
|
||||
"lj_vm_powi",
|
||||
"pow",
|
||||
"atan2",
|
||||
"ldexp",
|
||||
"lj_vm_tobit",
|
||||
"softfp_add",
|
||||
"softfp_sub",
|
||||
"softfp_mul",
|
||||
"softfp_div",
|
||||
"softfp_cmp",
|
||||
"softfp_i2d",
|
||||
"softfp_d2i",
|
||||
"lj_vm_sfmin",
|
||||
"lj_vm_sfmax",
|
||||
"lj_vm_tointg",
|
||||
"softfp_ui2d",
|
||||
"softfp_f2d",
|
||||
"softfp_d2ui",
|
||||
"softfp_d2f",
|
||||
"softfp_i2f",
|
||||
"softfp_ui2f",
|
||||
"softfp_f2i",
|
||||
"softfp_f2ui",
|
||||
"fp64_l2d",
|
||||
"fp64_ul2d",
|
||||
"fp64_l2f",
|
||||
"fp64_ul2f",
|
||||
"fp64_d2l",
|
||||
"fp64_d2ul",
|
||||
"fp64_f2l",
|
||||
"fp64_f2ul",
|
||||
"lj_carith_divi64",
|
||||
"lj_carith_divu64",
|
||||
"lj_carith_modi64",
|
||||
"lj_carith_modu64",
|
||||
"lj_carith_powi64",
|
||||
"lj_carith_powu64",
|
||||
"lj_cdata_newv",
|
||||
"lj_cdata_setfin",
|
||||
"strlen",
|
||||
"memcpy",
|
||||
"memset",
|
||||
"lj_vm_errno",
|
||||
"lj_carith_mul64",
|
||||
"lj_carith_shl64",
|
||||
"lj_carith_shr64",
|
||||
"lj_carith_sar64",
|
||||
"lj_carith_rol64",
|
||||
"lj_carith_ror64",
|
||||
},
|
||||
|
||||
traceerr = {
|
||||
[0]="error thrown or hook called during recording",
|
||||
"trace too short",
|
||||
"trace too long",
|
||||
"trace too deep",
|
||||
"too many snapshots",
|
||||
"blacklisted",
|
||||
"retry recording",
|
||||
"NYI: bytecode %d",
|
||||
"leaving loop in root trace",
|
||||
"inner loop in root trace",
|
||||
"loop unroll limit reached",
|
||||
"bad argument type",
|
||||
"JIT compilation disabled for function",
|
||||
"call unroll limit reached",
|
||||
"down-recursion, restarting",
|
||||
"NYI: unsupported variant of FastFunc %s",
|
||||
"NYI: return to lower frame",
|
||||
"store with nil or NaN key",
|
||||
"missing metamethod",
|
||||
"looping index lookup",
|
||||
"NYI: mixed sparse/dense table",
|
||||
"symbol not in cache",
|
||||
"NYI: unsupported C type conversion",
|
||||
"NYI: unsupported C function type",
|
||||
"guard would always fail",
|
||||
"too many PHIs",
|
||||
"persistent type instability",
|
||||
"failed to allocate mcode memory",
|
||||
"machine code too long",
|
||||
"hit mcode limit (retrying)",
|
||||
"too many spill slots",
|
||||
"inconsistent register allocation",
|
||||
"NYI: cannot assemble IR instruction %d",
|
||||
"NYI: PHI shuffling too complex",
|
||||
"NYI: register coalescing too complex",
|
||||
},
|
||||
|
||||
ffnames = {
|
||||
[0]="Lua",
|
||||
"C",
|
||||
"assert",
|
||||
"type",
|
||||
"next",
|
||||
"pairs",
|
||||
"ipairs_aux",
|
||||
"ipairs",
|
||||
"getmetatable",
|
||||
"setmetatable",
|
||||
"getfenv",
|
||||
"setfenv",
|
||||
"rawget",
|
||||
"rawset",
|
||||
"rawequal",
|
||||
"unpack",
|
||||
"select",
|
||||
"tonumber",
|
||||
"tostring",
|
||||
"error",
|
||||
"pcall",
|
||||
"xpcall",
|
||||
"loadfile",
|
||||
"load",
|
||||
"loadstring",
|
||||
"dofile",
|
||||
"gcinfo",
|
||||
"collectgarbage",
|
||||
"newproxy",
|
||||
"print",
|
||||
"coroutine.status",
|
||||
"coroutine.running",
|
||||
"coroutine.isyieldable",
|
||||
"coroutine.create",
|
||||
"coroutine.yield",
|
||||
"coroutine.resume",
|
||||
"coroutine.wrap_aux",
|
||||
"coroutine.wrap",
|
||||
"math.abs",
|
||||
"math.floor",
|
||||
"math.ceil",
|
||||
"math.sqrt",
|
||||
"math.log10",
|
||||
"math.exp",
|
||||
"math.sin",
|
||||
"math.cos",
|
||||
"math.tan",
|
||||
"math.asin",
|
||||
"math.acos",
|
||||
"math.atan",
|
||||
"math.sinh",
|
||||
"math.cosh",
|
||||
"math.tanh",
|
||||
"math.frexp",
|
||||
"math.modf",
|
||||
"math.log",
|
||||
"math.atan2",
|
||||
"math.pow",
|
||||
"math.fmod",
|
||||
"math.ldexp",
|
||||
"math.min",
|
||||
"math.max",
|
||||
"math.random",
|
||||
"math.randomseed",
|
||||
"bit.tobit",
|
||||
"bit.bnot",
|
||||
"bit.bswap",
|
||||
"bit.lshift",
|
||||
"bit.rshift",
|
||||
"bit.arshift",
|
||||
"bit.rol",
|
||||
"bit.ror",
|
||||
"bit.band",
|
||||
"bit.bor",
|
||||
"bit.bxor",
|
||||
"bit.tohex",
|
||||
"string.byte",
|
||||
"string.char",
|
||||
"string.sub",
|
||||
"string.rep",
|
||||
"string.reverse",
|
||||
"string.lower",
|
||||
"string.upper",
|
||||
"string.dump",
|
||||
"string.find",
|
||||
"string.match",
|
||||
"string.gmatch_aux",
|
||||
"string.gmatch",
|
||||
"string.gsub",
|
||||
"string.format",
|
||||
"table.maxn",
|
||||
"table.insert",
|
||||
"table.concat",
|
||||
"table.sort",
|
||||
"table.new",
|
||||
"table.clear",
|
||||
"io.method.close",
|
||||
"io.method.read",
|
||||
"io.method.write",
|
||||
"io.method.flush",
|
||||
"io.method.seek",
|
||||
"io.method.setvbuf",
|
||||
"io.method.lines",
|
||||
"io.method.__gc",
|
||||
"io.method.__tostring",
|
||||
"io.open",
|
||||
"io.popen",
|
||||
"io.tmpfile",
|
||||
"io.close",
|
||||
"io.read",
|
||||
"io.write",
|
||||
"io.flush",
|
||||
"io.input",
|
||||
"io.output",
|
||||
"io.lines",
|
||||
"io.type",
|
||||
"os.execute",
|
||||
"os.remove",
|
||||
"os.rename",
|
||||
"os.tmpname",
|
||||
"os.getenv",
|
||||
"os.exit",
|
||||
"os.clock",
|
||||
"os.date",
|
||||
"os.time",
|
||||
"os.difftime",
|
||||
"os.setlocale",
|
||||
"debug.getregistry",
|
||||
"debug.getmetatable",
|
||||
"debug.setmetatable",
|
||||
"debug.getfenv",
|
||||
"debug.setfenv",
|
||||
"debug.getinfo",
|
||||
"debug.getlocal",
|
||||
"debug.setlocal",
|
||||
"debug.getupvalue",
|
||||
"debug.setupvalue",
|
||||
"debug.upvalueid",
|
||||
"debug.upvaluejoin",
|
||||
"debug.sethook",
|
||||
"debug.gethook",
|
||||
"debug.debug",
|
||||
"debug.traceback",
|
||||
"jit.on",
|
||||
"jit.off",
|
||||
"jit.flush",
|
||||
"jit.status",
|
||||
"jit.security",
|
||||
"jit.attach",
|
||||
"jit.util.funcinfo",
|
||||
"jit.util.funcbc",
|
||||
"jit.util.funck",
|
||||
"jit.util.funcuvname",
|
||||
"jit.util.traceinfo",
|
||||
"jit.util.traceir",
|
||||
"jit.util.tracek",
|
||||
"jit.util.tracesnap",
|
||||
"jit.util.tracemc",
|
||||
"jit.util.traceexitstub",
|
||||
"jit.util.ircalladdr",
|
||||
"jit.opt.start",
|
||||
"jit.profile.start",
|
||||
"jit.profile.stop",
|
||||
"jit.profile.dumpstack",
|
||||
"ffi.meta.__index",
|
||||
"ffi.meta.__newindex",
|
||||
"ffi.meta.__eq",
|
||||
"ffi.meta.__len",
|
||||
"ffi.meta.__lt",
|
||||
"ffi.meta.__le",
|
||||
"ffi.meta.__concat",
|
||||
"ffi.meta.__call",
|
||||
"ffi.meta.__add",
|
||||
"ffi.meta.__sub",
|
||||
"ffi.meta.__mul",
|
||||
"ffi.meta.__div",
|
||||
"ffi.meta.__mod",
|
||||
"ffi.meta.__pow",
|
||||
"ffi.meta.__unm",
|
||||
"ffi.meta.__tostring",
|
||||
"ffi.meta.__pairs",
|
||||
"ffi.meta.__ipairs",
|
||||
"ffi.clib.__index",
|
||||
"ffi.clib.__newindex",
|
||||
"ffi.clib.__gc",
|
||||
"ffi.callback.free",
|
||||
"ffi.callback.set",
|
||||
"ffi.cdef",
|
||||
"ffi.new",
|
||||
"ffi.cast",
|
||||
"ffi.typeof",
|
||||
"ffi.typeinfo",
|
||||
"ffi.istype",
|
||||
"ffi.sizeof",
|
||||
"ffi.alignof",
|
||||
"ffi.offsetof",
|
||||
"ffi.errno",
|
||||
"ffi.string",
|
||||
"ffi.copy",
|
||||
"ffi.fill",
|
||||
"ffi.abi",
|
||||
"ffi.metatype",
|
||||
"ffi.gc",
|
||||
"ffi.load",
|
||||
"buffer.method.free",
|
||||
"buffer.method.reset",
|
||||
"buffer.method.skip",
|
||||
"buffer.method.set",
|
||||
"buffer.method.put",
|
||||
"buffer.method.putf",
|
||||
"buffer.method.get",
|
||||
"buffer.method.putcdata",
|
||||
"buffer.method.reserve",
|
||||
"buffer.method.commit",
|
||||
"buffer.method.ref",
|
||||
"buffer.method.encode",
|
||||
"buffer.method.decode",
|
||||
"buffer.method.__gc",
|
||||
"buffer.method.__tostring",
|
||||
"buffer.method.__len",
|
||||
"buffer.new",
|
||||
"buffer.encode",
|
||||
"buffer.decode",
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
-- This is a generated file. DO NOT EDIT!
|
||||
|
||||
assert(require("jit").version == "LuaJIT 2.1.1700008891", "LuaJIT core/library version mismatch")
|
||||
|
||||
return {
|
||||
|
||||
bcnames = "ISLT ISGE ISLE ISGT ISEQV ISNEV ISEQS ISNES ISEQN ISNEN ISEQP ISNEP ISTC ISFC IST ISF ISTYPEISNUM MOV NOT UNM LEN ADDVN SUBVN MULVN DIVVN MODVN ADDNV SUBNV MULNV DIVNV MODNV ADDVV SUBVV MULVV DIVVV MODVV POW CAT KSTR KCDATAKSHORTKNUM KPRI KNIL UGET USETV USETS USETN USETP UCLO FNEW TNEW TDUP GGET GSET TGETV TGETS TGETB TGETR TSETV TSETS TSETB TSETM TSETR CALLM CALL CALLMTCALLT ITERC ITERN VARG ISNEXTRETM RET RET0 RET1 FORI JFORI FORL IFORL JFORL ITERL IITERLJITERLLOOP ILOOP JLOOP JMP FUNCF IFUNCFJFUNCFFUNCV IFUNCVJFUNCVFUNCC FUNCCW",
|
||||
|
||||
irnames = "LT GE LE GT ULT UGE ULE UGT EQ NE ABC RETF NOP BASE PVAL GCSTEPHIOP LOOP USE PHI RENAMEPROF KPRI KINT KGC KPTR KKPTR KNULL KNUM KINT64KSLOT BNOT BSWAP BAND BOR BXOR BSHL BSHR BSAR BROL BROR ADD SUB MUL DIV MOD POW NEG ABS LDEXP MIN MAX FPMATHADDOV SUBOV MULOV AREF HREFK HREF NEWREFUREFO UREFC FREF TMPREFSTRREFLREF ALOAD HLOAD ULOAD FLOAD XLOAD SLOAD VLOAD ALEN ASTOREHSTOREUSTOREFSTOREXSTORESNEW XSNEW TNEW TDUP CNEW CNEWI BUFHDRBUFPUTBUFSTRTBAR OBAR XBAR CONV TOBIT TOSTR STRTO CALLN CALLA CALLL CALLS CALLXSCARG ",
|
||||
|
||||
irfpm = { [0]="floor", "ceil", "trunc", "sqrt", "log", "log2", "other", },
|
||||
|
||||
irfield = { [0]="str.len", "func.env", "func.pc", "func.ffid", "thread.env", "tab.meta", "tab.array", "tab.node", "tab.asize", "tab.hmask", "tab.nomm", "udata.meta", "udata.udtype", "udata.file", "sbuf.w", "sbuf.e", "sbuf.b", "sbuf.l", "sbuf.ref", "sbuf.r", "cdata.ctypeid", "cdata.ptr", "cdata.int", "cdata.int64", "cdata.int64_4", },
|
||||
|
||||
ircall = {
|
||||
[0]="lj_str_cmp",
|
||||
"lj_str_find",
|
||||
"lj_str_new",
|
||||
"lj_strscan_num",
|
||||
"lj_strfmt_int",
|
||||
"lj_strfmt_num",
|
||||
"lj_strfmt_char",
|
||||
"lj_strfmt_putint",
|
||||
"lj_strfmt_putnum",
|
||||
"lj_strfmt_putquoted",
|
||||
"lj_strfmt_putfxint",
|
||||
"lj_strfmt_putfnum_int",
|
||||
"lj_strfmt_putfnum_uint",
|
||||
"lj_strfmt_putfnum",
|
||||
"lj_strfmt_putfstr",
|
||||
"lj_strfmt_putfchar",
|
||||
"lj_buf_putmem",
|
||||
"lj_buf_putstr",
|
||||
"lj_buf_putchar",
|
||||
"lj_buf_putstr_reverse",
|
||||
"lj_buf_putstr_lower",
|
||||
"lj_buf_putstr_upper",
|
||||
"lj_buf_putstr_rep",
|
||||
"lj_buf_puttab",
|
||||
"lj_bufx_set",
|
||||
"lj_bufx_more",
|
||||
"lj_serialize_put",
|
||||
"lj_serialize_get",
|
||||
"lj_serialize_encode",
|
||||
"lj_serialize_decode",
|
||||
"lj_buf_tostr",
|
||||
"lj_tab_new_ah",
|
||||
"lj_tab_new1",
|
||||
"lj_tab_dup",
|
||||
"lj_tab_clear",
|
||||
"lj_tab_newkey",
|
||||
"lj_tab_keyindex",
|
||||
"lj_vm_next",
|
||||
"lj_tab_len",
|
||||
"lj_tab_len_hint",
|
||||
"lj_gc_step_jit",
|
||||
"lj_gc_barrieruv",
|
||||
"lj_mem_newgco",
|
||||
"lj_prng_u64d",
|
||||
"lj_vm_modi",
|
||||
"log10",
|
||||
"exp",
|
||||
"sin",
|
||||
"cos",
|
||||
"tan",
|
||||
"asin",
|
||||
"acos",
|
||||
"atan",
|
||||
"sinh",
|
||||
"cosh",
|
||||
"tanh",
|
||||
"fputc",
|
||||
"fwrite",
|
||||
"fflush",
|
||||
"lj_vm_floor",
|
||||
"lj_vm_ceil",
|
||||
"lj_vm_trunc",
|
||||
"sqrt",
|
||||
"log",
|
||||
"lj_vm_log2",
|
||||
"pow",
|
||||
"atan2",
|
||||
"ldexp",
|
||||
"lj_vm_tobit",
|
||||
"softfp_add",
|
||||
"softfp_sub",
|
||||
"softfp_mul",
|
||||
"softfp_div",
|
||||
"softfp_cmp",
|
||||
"softfp_i2d",
|
||||
"softfp_d2i",
|
||||
"lj_vm_sfmin",
|
||||
"lj_vm_sfmax",
|
||||
"lj_vm_tointg",
|
||||
"softfp_ui2d",
|
||||
"softfp_f2d",
|
||||
"softfp_d2ui",
|
||||
"softfp_d2f",
|
||||
"softfp_i2f",
|
||||
"softfp_ui2f",
|
||||
"softfp_f2i",
|
||||
"softfp_f2ui",
|
||||
"fp64_l2d",
|
||||
"fp64_ul2d",
|
||||
"fp64_l2f",
|
||||
"fp64_ul2f",
|
||||
"fp64_d2l",
|
||||
"fp64_d2ul",
|
||||
"fp64_f2l",
|
||||
"fp64_f2ul",
|
||||
"lj_carith_divi64",
|
||||
"lj_carith_divu64",
|
||||
"lj_carith_modi64",
|
||||
"lj_carith_modu64",
|
||||
"lj_carith_powi64",
|
||||
"lj_carith_powu64",
|
||||
"lj_cdata_newv",
|
||||
"lj_cdata_setfin",
|
||||
"strlen",
|
||||
"memcpy",
|
||||
"memset",
|
||||
"lj_vm_errno",
|
||||
"lj_carith_mul64",
|
||||
"lj_carith_shl64",
|
||||
"lj_carith_shr64",
|
||||
"lj_carith_sar64",
|
||||
"lj_carith_rol64",
|
||||
"lj_carith_ror64",
|
||||
},
|
||||
|
||||
traceerr = {
|
||||
[0]="error thrown or hook called during recording",
|
||||
"trace too short",
|
||||
"trace too long",
|
||||
"trace too deep",
|
||||
"too many snapshots",
|
||||
"blacklisted",
|
||||
"retry recording",
|
||||
"NYI: bytecode %d",
|
||||
"leaving loop in root trace",
|
||||
"inner loop in root trace",
|
||||
"loop unroll limit reached",
|
||||
"bad argument type",
|
||||
"JIT compilation disabled for function",
|
||||
"call unroll limit reached",
|
||||
"down-recursion, restarting",
|
||||
"NYI: unsupported variant of FastFunc %s",
|
||||
"NYI: return to lower frame",
|
||||
"store with nil or NaN key",
|
||||
"missing metamethod",
|
||||
"looping index lookup",
|
||||
"NYI: mixed sparse/dense table",
|
||||
"symbol not in cache",
|
||||
"NYI: unsupported C type conversion",
|
||||
"NYI: unsupported C function type",
|
||||
"guard would always fail",
|
||||
"too many PHIs",
|
||||
"persistent type instability",
|
||||
"failed to allocate mcode memory",
|
||||
"machine code too long",
|
||||
"hit mcode limit (retrying)",
|
||||
"too many spill slots",
|
||||
"inconsistent register allocation",
|
||||
"NYI: cannot assemble IR instruction %d",
|
||||
"NYI: PHI shuffling too complex",
|
||||
"NYI: register coalescing too complex",
|
||||
},
|
||||
|
||||
ffnames = {
|
||||
[0]="Lua",
|
||||
"C",
|
||||
"assert",
|
||||
"type",
|
||||
"next",
|
||||
"pairs",
|
||||
"ipairs_aux",
|
||||
"ipairs",
|
||||
"getmetatable",
|
||||
"setmetatable",
|
||||
"getfenv",
|
||||
"setfenv",
|
||||
"rawget",
|
||||
"rawset",
|
||||
"rawequal",
|
||||
"unpack",
|
||||
"select",
|
||||
"tonumber",
|
||||
"tostring",
|
||||
"error",
|
||||
"pcall",
|
||||
"xpcall",
|
||||
"loadfile",
|
||||
"load",
|
||||
"loadstring",
|
||||
"dofile",
|
||||
"gcinfo",
|
||||
"collectgarbage",
|
||||
"newproxy",
|
||||
"print",
|
||||
"coroutine.status",
|
||||
"coroutine.running",
|
||||
"coroutine.isyieldable",
|
||||
"coroutine.create",
|
||||
"coroutine.yield",
|
||||
"coroutine.resume",
|
||||
"coroutine.wrap_aux",
|
||||
"coroutine.wrap",
|
||||
"math.abs",
|
||||
"math.floor",
|
||||
"math.ceil",
|
||||
"math.sqrt",
|
||||
"math.log10",
|
||||
"math.exp",
|
||||
"math.sin",
|
||||
"math.cos",
|
||||
"math.tan",
|
||||
"math.asin",
|
||||
"math.acos",
|
||||
"math.atan",
|
||||
"math.sinh",
|
||||
"math.cosh",
|
||||
"math.tanh",
|
||||
"math.frexp",
|
||||
"math.modf",
|
||||
"math.log",
|
||||
"math.atan2",
|
||||
"math.pow",
|
||||
"math.fmod",
|
||||
"math.ldexp",
|
||||
"math.min",
|
||||
"math.max",
|
||||
"math.random",
|
||||
"math.randomseed",
|
||||
"bit.tobit",
|
||||
"bit.bnot",
|
||||
"bit.bswap",
|
||||
"bit.lshift",
|
||||
"bit.rshift",
|
||||
"bit.arshift",
|
||||
"bit.rol",
|
||||
"bit.ror",
|
||||
"bit.band",
|
||||
"bit.bor",
|
||||
"bit.bxor",
|
||||
"bit.tohex",
|
||||
"string.byte",
|
||||
"string.char",
|
||||
"string.sub",
|
||||
"string.rep",
|
||||
"string.reverse",
|
||||
"string.lower",
|
||||
"string.upper",
|
||||
"string.dump",
|
||||
"string.find",
|
||||
"string.match",
|
||||
"string.gmatch_aux",
|
||||
"string.gmatch",
|
||||
"string.gsub",
|
||||
"string.format",
|
||||
"table.maxn",
|
||||
"table.insert",
|
||||
"table.concat",
|
||||
"table.sort",
|
||||
"table.new",
|
||||
"table.clear",
|
||||
"io.method.close",
|
||||
"io.method.read",
|
||||
"io.method.write",
|
||||
"io.method.flush",
|
||||
"io.method.seek",
|
||||
"io.method.setvbuf",
|
||||
"io.method.lines",
|
||||
"io.method.__gc",
|
||||
"io.method.__tostring",
|
||||
"io.open",
|
||||
"io.popen",
|
||||
"io.tmpfile",
|
||||
"io.close",
|
||||
"io.read",
|
||||
"io.write",
|
||||
"io.flush",
|
||||
"io.input",
|
||||
"io.output",
|
||||
"io.lines",
|
||||
"io.type",
|
||||
"os.execute",
|
||||
"os.remove",
|
||||
"os.rename",
|
||||
"os.tmpname",
|
||||
"os.getenv",
|
||||
"os.exit",
|
||||
"os.clock",
|
||||
"os.date",
|
||||
"os.time",
|
||||
"os.difftime",
|
||||
"os.setlocale",
|
||||
"debug.getregistry",
|
||||
"debug.getmetatable",
|
||||
"debug.setmetatable",
|
||||
"debug.getfenv",
|
||||
"debug.setfenv",
|
||||
"debug.getinfo",
|
||||
"debug.getlocal",
|
||||
"debug.setlocal",
|
||||
"debug.getupvalue",
|
||||
"debug.setupvalue",
|
||||
"debug.upvalueid",
|
||||
"debug.upvaluejoin",
|
||||
"debug.sethook",
|
||||
"debug.gethook",
|
||||
"debug.debug",
|
||||
"debug.traceback",
|
||||
"jit.on",
|
||||
"jit.off",
|
||||
"jit.flush",
|
||||
"jit.status",
|
||||
"jit.security",
|
||||
"jit.attach",
|
||||
"jit.util.funcinfo",
|
||||
"jit.util.funcbc",
|
||||
"jit.util.funck",
|
||||
"jit.util.funcuvname",
|
||||
"jit.util.traceinfo",
|
||||
"jit.util.traceir",
|
||||
"jit.util.tracek",
|
||||
"jit.util.tracesnap",
|
||||
"jit.util.tracemc",
|
||||
"jit.util.traceexitstub",
|
||||
"jit.util.ircalladdr",
|
||||
"jit.opt.start",
|
||||
"jit.profile.start",
|
||||
"jit.profile.stop",
|
||||
"jit.profile.dumpstack",
|
||||
"ffi.meta.__index",
|
||||
"ffi.meta.__newindex",
|
||||
"ffi.meta.__eq",
|
||||
"ffi.meta.__len",
|
||||
"ffi.meta.__lt",
|
||||
"ffi.meta.__le",
|
||||
"ffi.meta.__concat",
|
||||
"ffi.meta.__call",
|
||||
"ffi.meta.__add",
|
||||
"ffi.meta.__sub",
|
||||
"ffi.meta.__mul",
|
||||
"ffi.meta.__div",
|
||||
"ffi.meta.__mod",
|
||||
"ffi.meta.__pow",
|
||||
"ffi.meta.__unm",
|
||||
"ffi.meta.__tostring",
|
||||
"ffi.meta.__pairs",
|
||||
"ffi.meta.__ipairs",
|
||||
"ffi.clib.__index",
|
||||
"ffi.clib.__newindex",
|
||||
"ffi.clib.__gc",
|
||||
"ffi.callback.free",
|
||||
"ffi.callback.set",
|
||||
"ffi.cdef",
|
||||
"ffi.new",
|
||||
"ffi.cast",
|
||||
"ffi.typeof",
|
||||
"ffi.typeinfo",
|
||||
"ffi.istype",
|
||||
"ffi.sizeof",
|
||||
"ffi.alignof",
|
||||
"ffi.offsetof",
|
||||
"ffi.errno",
|
||||
"ffi.string",
|
||||
"ffi.copy",
|
||||
"ffi.fill",
|
||||
"ffi.abi",
|
||||
"ffi.metatype",
|
||||
"ffi.gc",
|
||||
"ffi.load",
|
||||
"buffer.method.free",
|
||||
"buffer.method.reset",
|
||||
"buffer.method.skip",
|
||||
"buffer.method.set",
|
||||
"buffer.method.put",
|
||||
"buffer.method.putf",
|
||||
"buffer.method.get",
|
||||
"buffer.method.putcdata",
|
||||
"buffer.method.reserve",
|
||||
"buffer.method.commit",
|
||||
"buffer.method.ref",
|
||||
"buffer.method.encode",
|
||||
"buffer.method.decode",
|
||||
"buffer.method.__gc",
|
||||
"buffer.method.__tostring",
|
||||
"buffer.method.__len",
|
||||
"buffer.new",
|
||||
"buffer.encode",
|
||||
"buffer.decode",
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT profiler zones.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
** LuaJIT -- a Just-In-Time Compiler for Lua. https://luajit.org/
|
||||
**
|
||||
** Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining
|
||||
** a copy of this software and associated documentation files (the
|
||||
** "Software"), to deal in the Software without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Software, and to
|
||||
** permit persons to whom the Software is furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be
|
||||
** included in all copies or substantial portions of the Software.
|
||||
**
|
||||
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
**
|
||||
** [ MIT license: https://www.opensource.org/licenses/mit-license.php ]
|
||||
*/
|
||||
|
||||
#ifndef _LUAJIT_H
|
||||
#define _LUAJIT_H
|
||||
|
||||
#include "lua.h"
|
||||
|
||||
#define LUAJIT_VERSION "LuaJIT 2.1.1700008891"
|
||||
#define LUAJIT_VERSION_NUM 20199 /* Deprecated. */
|
||||
#define LUAJIT_VERSION_SYM luaJIT_version_2_1_1700008891
|
||||
#define LUAJIT_COPYRIGHT "Copyright (C) 2005-2023 Mike Pall"
|
||||
#define LUAJIT_URL "https://luajit.org/"
|
||||
|
||||
/* Modes for luaJIT_setmode. */
|
||||
#define LUAJIT_MODE_MASK 0x00ff
|
||||
|
||||
enum {
|
||||
LUAJIT_MODE_ENGINE, /* Set mode for whole JIT engine. */
|
||||
LUAJIT_MODE_DEBUG, /* Set debug mode (idx = level). */
|
||||
|
||||
LUAJIT_MODE_FUNC, /* Change mode for a function. */
|
||||
LUAJIT_MODE_ALLFUNC, /* Recurse into subroutine protos. */
|
||||
LUAJIT_MODE_ALLSUBFUNC, /* Change only the subroutines. */
|
||||
|
||||
LUAJIT_MODE_TRACE, /* Flush a compiled trace. */
|
||||
|
||||
LUAJIT_MODE_WRAPCFUNC = 0x10, /* Set wrapper mode for C function calls. */
|
||||
|
||||
LUAJIT_MODE_MAX
|
||||
};
|
||||
|
||||
/* Flags or'ed in to the mode. */
|
||||
#define LUAJIT_MODE_OFF 0x0000 /* Turn feature off. */
|
||||
#define LUAJIT_MODE_ON 0x0100 /* Turn feature on. */
|
||||
#define LUAJIT_MODE_FLUSH 0x0200 /* Flush JIT-compiled code. */
|
||||
|
||||
/* LuaJIT public C API. */
|
||||
|
||||
/* Control the JIT engine. */
|
||||
LUA_API int luaJIT_setmode(lua_State *L, int idx, int mode);
|
||||
|
||||
/* Low-overhead profiling API. */
|
||||
typedef void (*luaJIT_profile_callback)(void *data, lua_State *L,
|
||||
int samples, int vmstate);
|
||||
LUA_API void luaJIT_profile_start(lua_State *L, const char *mode,
|
||||
luaJIT_profile_callback cb, void *data);
|
||||
LUA_API void luaJIT_profile_stop(lua_State *L);
|
||||
LUA_API const char *luaJIT_profile_dumpstack(lua_State *L, const char *fmt,
|
||||
int depth, size_t *len);
|
||||
|
||||
/* Enforce (dynamic) linker error for version mismatches. Call from main. */
|
||||
LUA_API void LUAJIT_VERSION_SYM(void);
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT bytecode listing module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -41,7 +41,6 @@
|
||||
|
||||
-- Cache some library functions and objects.
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
local jutil = require("jit.util")
|
||||
local vmdef = require("jit.vmdef")
|
||||
local bit = require("bit")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT module to save/list bytecode.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -11,7 +11,7 @@
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
assert(jit.version_num == 20199, "LuaJIT core/library version mismatch")
|
||||
local bit = require("bit")
|
||||
|
||||
-- Symbol name prefix for LuaJIT bytecode.
|
||||
@@ -33,11 +33,12 @@ Save LuaJIT bytecode: luajit -b[options] input output
|
||||
-t type Set output file type (default: auto-detect from output name).
|
||||
-a arch Override architecture for object files (default: native).
|
||||
-o os Override OS for object files (default: native).
|
||||
-F name Override filename (default: input filename).
|
||||
-e chunk Use chunk string as input.
|
||||
-- Stop handling options.
|
||||
- Use stdin as input and/or stdout as output.
|
||||
|
||||
File types: c h obj o raw (default)
|
||||
File types: c cc h obj o raw (default)
|
||||
]]
|
||||
os.exit(1)
|
||||
end
|
||||
@@ -49,10 +50,22 @@ local function check(ok, ...)
|
||||
os.exit(1)
|
||||
end
|
||||
|
||||
local function readfile(input)
|
||||
local function readfile(ctx, input)
|
||||
if type(input) == "function" then return input end
|
||||
if input == "-" then input = nil end
|
||||
return check(loadfile(input))
|
||||
if ctx.filename then
|
||||
local data
|
||||
if input == "-" then
|
||||
data = io.stdin:read("*a")
|
||||
else
|
||||
local fp = assert(io.open(input, "rb"))
|
||||
data = assert(fp:read("*a"))
|
||||
assert(fp:close())
|
||||
end
|
||||
return check(load(data, ctx.filename))
|
||||
else
|
||||
if input == "-" then input = nil end
|
||||
return check(loadfile(input))
|
||||
end
|
||||
end
|
||||
|
||||
local function savefile(name, mode)
|
||||
@@ -68,7 +81,7 @@ end
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
local map_type = {
|
||||
raw = "raw", c = "c", h = "h", o = "obj", obj = "obj",
|
||||
raw = "raw", c = "c", cc = "c", h = "h", o = "obj", obj = "obj",
|
||||
}
|
||||
|
||||
local map_arch = {
|
||||
@@ -456,18 +469,18 @@ typedef struct {
|
||||
uint32_t value;
|
||||
} mach_nlist;
|
||||
typedef struct {
|
||||
uint32_t strx;
|
||||
int32_t strx;
|
||||
uint8_t type, sect;
|
||||
uint16_t desc;
|
||||
uint64_t value;
|
||||
} mach_nlist_64;
|
||||
typedef struct
|
||||
{
|
||||
uint32_t magic, nfat_arch;
|
||||
int32_t magic, nfat_arch;
|
||||
} mach_fat_header;
|
||||
typedef struct
|
||||
{
|
||||
uint32_t cputype, cpusubtype, offset, size, align;
|
||||
int32_t cputype, cpusubtype, offset, size, align;
|
||||
} mach_fat_arch;
|
||||
typedef struct {
|
||||
struct {
|
||||
@@ -501,6 +514,18 @@ typedef struct {
|
||||
mach_nlist sym_entry;
|
||||
uint8_t space[4096];
|
||||
} mach_fat_obj;
|
||||
typedef struct {
|
||||
mach_fat_header fat;
|
||||
mach_fat_arch fat_arch[2];
|
||||
struct {
|
||||
mach_header_64 hdr;
|
||||
mach_segment_command_64 seg;
|
||||
mach_section_64 sec;
|
||||
mach_symtab_command sym;
|
||||
} arch[2];
|
||||
mach_nlist_64 sym_entry;
|
||||
uint8_t space[4096];
|
||||
} mach_fat_obj_64;
|
||||
]]
|
||||
local symname = '_'..LJBC_PREFIX..ctx.modname
|
||||
local isfat, is64, align, mobj = false, false, 4, "mach_obj"
|
||||
@@ -509,7 +534,7 @@ typedef struct {
|
||||
elseif ctx.arch == "arm" then
|
||||
isfat, mobj = true, "mach_fat_obj"
|
||||
elseif ctx.arch == "arm64" then
|
||||
is64, align, isfat, mobj = true, 8, true, "mach_fat_obj"
|
||||
is64, align, isfat, mobj = true, 8, true, "mach_fat_obj_64"
|
||||
else
|
||||
check(ctx.arch == "x86", "unsupported architecture for OSX")
|
||||
end
|
||||
@@ -592,13 +617,13 @@ end
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
local function bclist(input, output)
|
||||
local f = readfile(input)
|
||||
local function bclist(ctx, input, output)
|
||||
local f = readfile(ctx, input)
|
||||
require("jit.bc").dump(f, savefile(output, "w"), true)
|
||||
end
|
||||
|
||||
local function bcsave(ctx, input, output)
|
||||
local f = readfile(input)
|
||||
local f = readfile(ctx, input)
|
||||
local s = string.dump(f, ctx.strip)
|
||||
local t = ctx.type
|
||||
if not t then
|
||||
@@ -651,6 +676,8 @@ local function docmd(...)
|
||||
ctx.arch = checkarg(tremove(arg, n), map_arch, "architecture")
|
||||
elseif opt == "o" then
|
||||
ctx.os = checkarg(tremove(arg, n), map_os, "OS name")
|
||||
elseif opt == "F" then
|
||||
ctx.filename = "@"..tremove(arg, n)
|
||||
else
|
||||
usage()
|
||||
end
|
||||
@@ -662,7 +689,7 @@ local function docmd(...)
|
||||
end
|
||||
if list then
|
||||
if #arg == 0 or #arg > 2 then usage() end
|
||||
bclist(arg[1], arg[2] or "-")
|
||||
bclist(ctx, arg[1], arg[2] or "-")
|
||||
else
|
||||
if #arg ~= 2 then usage() end
|
||||
bcsave(ctx, arg[1], arg[2])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT ARM disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT ARM64 disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
--
|
||||
-- Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com.
|
||||
@@ -107,24 +107,20 @@ local map_logsr = { -- Logical, shifted register.
|
||||
[0] = {
|
||||
shift = 29, mask = 3,
|
||||
[0] = {
|
||||
shift = 21, mask = 7,
|
||||
[0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg",
|
||||
"andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "andDNMSg", "bicDNMSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] ="orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg",
|
||||
"orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg",
|
||||
"eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "eorDNMSg", "eonDNMSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg",
|
||||
"ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "ands|tstD0NMSg", "bicsDNMSg"
|
||||
}
|
||||
},
|
||||
false -- unallocated
|
||||
@@ -132,24 +128,20 @@ local map_logsr = { -- Logical, shifted register.
|
||||
{
|
||||
shift = 29, mask = 3,
|
||||
[0] = {
|
||||
shift = 21, mask = 7,
|
||||
[0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg",
|
||||
"andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "andDNMSg", "bicDNMSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg",
|
||||
"orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg",
|
||||
"eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "eorDNMSg", "eonDNMSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg",
|
||||
"ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "ands|tstD0NMSg", "bicsDNMSg"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -735,7 +727,7 @@ local map_cond = {
|
||||
"hi", "ls", "ge", "lt", "gt", "le", "al",
|
||||
}
|
||||
|
||||
local map_shift = { [0] = "lsl", "lsr", "asr", }
|
||||
local map_shift = { [0] = "lsl", "lsr", "asr", "ror"}
|
||||
|
||||
local map_extend = {
|
||||
[0] = "uxtb", "uxth", "uxtw", "uxtx", "sxtb", "sxth", "sxtw", "sxtx",
|
||||
@@ -956,7 +948,7 @@ local function disass_ins(ctx)
|
||||
elseif p == "U" then
|
||||
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
||||
local sz = band(rshift(op, 30), 3)
|
||||
local imm12 = lshift(arshift(lshift(op, 10), 20), sz)
|
||||
local imm12 = lshift(rshift(lshift(op, 10), 20), sz)
|
||||
if imm12 ~= 0 then
|
||||
x = "["..rn..", #"..imm12.."]"
|
||||
else
|
||||
@@ -993,8 +985,7 @@ local function disass_ins(ctx)
|
||||
x = x.."]"
|
||||
end
|
||||
elseif p == "P" then
|
||||
local opcv, sh = rshift(op, 26), 2
|
||||
if opcv >= 0x2a then sh = 4 elseif opcv >= 0x1b then sh = 3 end
|
||||
local sh = 2 + rshift(op, 31 - band(rshift(op, 26), 1))
|
||||
local imm7 = lshift(arshift(lshift(op, 10), 25), sh)
|
||||
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
||||
local ind = band(rshift(op, 23), 3)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT ARM64BE disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- ARM64 instructions are always little-endian. So just forward to the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT/X license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS64 disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the big-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS64EL disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the little-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS64R6 disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the r6 big-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS64R6EL disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the r6 little-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPSEL disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the little-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT PPC disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT/X license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT x64 disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the 64 bit functions from the combined
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT x86/x64 disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT compiler dump module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -55,7 +55,6 @@
|
||||
|
||||
-- Cache some library functions and objects.
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
local jutil = require("jit.util")
|
||||
local vmdef = require("jit.vmdef")
|
||||
local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT profiler.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -41,7 +41,6 @@
|
||||
|
||||
-- Cache some library functions and objects.
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
local profile = require("jit.profile")
|
||||
local vmdef = require("jit.vmdef")
|
||||
local math = math
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- Verbose mode of the LuaJIT compiler.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -59,7 +59,6 @@
|
||||
|
||||
-- Cache some library functions and objects.
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
local jutil = require("jit.util")
|
||||
local vmdef = require("jit.vmdef")
|
||||
local funcinfo, traceinfo = jutil.funcinfo, jutil.traceinfo
|
||||
|
||||
@@ -1,395 +1,396 @@
|
||||
-- This is a generated file. DO NOT EDIT!
|
||||
|
||||
return {
|
||||
|
||||
bcnames = "ISLT ISGE ISLE ISGT ISEQV ISNEV ISEQS ISNES ISEQN ISNEN ISEQP ISNEP ISTC ISFC IST ISF ISTYPEISNUM MOV NOT UNM LEN ADDVN SUBVN MULVN DIVVN MODVN ADDNV SUBNV MULNV DIVNV MODNV ADDVV SUBVV MULVV DIVVV MODVV POW CAT KSTR KCDATAKSHORTKNUM KPRI KNIL UGET USETV USETS USETN USETP UCLO FNEW TNEW TDUP GGET GSET TGETV TGETS TGETB TGETR TSETV TSETS TSETB TSETM TSETR CALLM CALL CALLMTCALLT ITERC ITERN VARG ISNEXTRETM RET RET0 RET1 FORI JFORI FORL IFORL JFORL ITERL IITERLJITERLLOOP ILOOP JLOOP JMP FUNCF IFUNCFJFUNCFFUNCV IFUNCVJFUNCVFUNCC FUNCCW",
|
||||
|
||||
irnames = "LT GE LE GT ULT UGE ULE UGT EQ NE ABC RETF NOP BASE PVAL GCSTEPHIOP LOOP USE PHI RENAMEPROF KPRI KINT KGC KPTR KKPTR KNULL KNUM KINT64KSLOT BNOT BSWAP BAND BOR BXOR BSHL BSHR BSAR BROL BROR ADD SUB MUL DIV MOD POW NEG ABS LDEXP MIN MAX FPMATHADDOV SUBOV MULOV AREF HREFK HREF NEWREFUREFO UREFC FREF TMPREFSTRREFLREF ALOAD HLOAD ULOAD FLOAD XLOAD SLOAD VLOAD ALEN ASTOREHSTOREUSTOREFSTOREXSTORESNEW XSNEW TNEW TDUP CNEW CNEWI BUFHDRBUFPUTBUFSTRTBAR OBAR XBAR CONV TOBIT TOSTR STRTO CALLN CALLA CALLL CALLS CALLXSCARG ",
|
||||
|
||||
irfpm = { [0]="floor", "ceil", "trunc", "sqrt", "log", "log2", "other", },
|
||||
|
||||
irfield = { [0]="str.len", "func.env", "func.pc", "func.ffid", "thread.env", "tab.meta", "tab.array", "tab.node", "tab.asize", "tab.hmask", "tab.nomm", "udata.meta", "udata.udtype", "udata.file", "sbuf.w", "sbuf.e", "sbuf.b", "sbuf.l", "sbuf.ref", "sbuf.r", "cdata.ctypeid", "cdata.ptr", "cdata.int", "cdata.int64", "cdata.int64_4", },
|
||||
|
||||
ircall = {
|
||||
[0]="lj_str_cmp",
|
||||
"lj_str_find",
|
||||
"lj_str_new",
|
||||
"lj_strscan_num",
|
||||
"lj_strfmt_int",
|
||||
"lj_strfmt_num",
|
||||
"lj_strfmt_char",
|
||||
"lj_strfmt_putint",
|
||||
"lj_strfmt_putnum",
|
||||
"lj_strfmt_putquoted",
|
||||
"lj_strfmt_putfxint",
|
||||
"lj_strfmt_putfnum_int",
|
||||
"lj_strfmt_putfnum_uint",
|
||||
"lj_strfmt_putfnum",
|
||||
"lj_strfmt_putfstr",
|
||||
"lj_strfmt_putfchar",
|
||||
"lj_buf_putmem",
|
||||
"lj_buf_putstr",
|
||||
"lj_buf_putchar",
|
||||
"lj_buf_putstr_reverse",
|
||||
"lj_buf_putstr_lower",
|
||||
"lj_buf_putstr_upper",
|
||||
"lj_buf_putstr_rep",
|
||||
"lj_buf_puttab",
|
||||
"lj_bufx_set",
|
||||
"lj_bufx_more",
|
||||
"lj_serialize_put",
|
||||
"lj_serialize_get",
|
||||
"lj_serialize_encode",
|
||||
"lj_serialize_decode",
|
||||
"lj_buf_tostr",
|
||||
"lj_tab_new_ah",
|
||||
"lj_tab_new1",
|
||||
"lj_tab_dup",
|
||||
"lj_tab_clear",
|
||||
"lj_tab_newkey",
|
||||
"lj_tab_keyindex",
|
||||
"lj_vm_next",
|
||||
"lj_tab_len",
|
||||
"lj_tab_len_hint",
|
||||
"lj_gc_step_jit",
|
||||
"lj_gc_barrieruv",
|
||||
"lj_mem_newgco",
|
||||
"lj_prng_u64d",
|
||||
"lj_vm_modi",
|
||||
"log10",
|
||||
"exp",
|
||||
"sin",
|
||||
"cos",
|
||||
"tan",
|
||||
"asin",
|
||||
"acos",
|
||||
"atan",
|
||||
"sinh",
|
||||
"cosh",
|
||||
"tanh",
|
||||
"fputc",
|
||||
"fwrite",
|
||||
"fflush",
|
||||
"lj_vm_floor",
|
||||
"lj_vm_ceil",
|
||||
"lj_vm_trunc",
|
||||
"sqrt",
|
||||
"log",
|
||||
"lj_vm_log2",
|
||||
"lj_vm_powi",
|
||||
"pow",
|
||||
"atan2",
|
||||
"ldexp",
|
||||
"lj_vm_tobit",
|
||||
"softfp_add",
|
||||
"softfp_sub",
|
||||
"softfp_mul",
|
||||
"softfp_div",
|
||||
"softfp_cmp",
|
||||
"softfp_i2d",
|
||||
"softfp_d2i",
|
||||
"lj_vm_sfmin",
|
||||
"lj_vm_sfmax",
|
||||
"lj_vm_tointg",
|
||||
"softfp_ui2d",
|
||||
"softfp_f2d",
|
||||
"softfp_d2ui",
|
||||
"softfp_d2f",
|
||||
"softfp_i2f",
|
||||
"softfp_ui2f",
|
||||
"softfp_f2i",
|
||||
"softfp_f2ui",
|
||||
"fp64_l2d",
|
||||
"fp64_ul2d",
|
||||
"fp64_l2f",
|
||||
"fp64_ul2f",
|
||||
"fp64_d2l",
|
||||
"fp64_d2ul",
|
||||
"fp64_f2l",
|
||||
"fp64_f2ul",
|
||||
"lj_carith_divi64",
|
||||
"lj_carith_divu64",
|
||||
"lj_carith_modi64",
|
||||
"lj_carith_modu64",
|
||||
"lj_carith_powi64",
|
||||
"lj_carith_powu64",
|
||||
"lj_cdata_newv",
|
||||
"lj_cdata_setfin",
|
||||
"strlen",
|
||||
"memcpy",
|
||||
"memset",
|
||||
"lj_vm_errno",
|
||||
"lj_carith_mul64",
|
||||
"lj_carith_shl64",
|
||||
"lj_carith_shr64",
|
||||
"lj_carith_sar64",
|
||||
"lj_carith_rol64",
|
||||
"lj_carith_ror64",
|
||||
},
|
||||
|
||||
traceerr = {
|
||||
[0]="error thrown or hook called during recording",
|
||||
"trace too short",
|
||||
"trace too long",
|
||||
"trace too deep",
|
||||
"too many snapshots",
|
||||
"blacklisted",
|
||||
"retry recording",
|
||||
"NYI: bytecode %d",
|
||||
"leaving loop in root trace",
|
||||
"inner loop in root trace",
|
||||
"loop unroll limit reached",
|
||||
"bad argument type",
|
||||
"JIT compilation disabled for function",
|
||||
"call unroll limit reached",
|
||||
"down-recursion, restarting",
|
||||
"NYI: unsupported variant of FastFunc %s",
|
||||
"NYI: return to lower frame",
|
||||
"store with nil or NaN key",
|
||||
"missing metamethod",
|
||||
"looping index lookup",
|
||||
"NYI: mixed sparse/dense table",
|
||||
"symbol not in cache",
|
||||
"NYI: unsupported C type conversion",
|
||||
"NYI: unsupported C function type",
|
||||
"guard would always fail",
|
||||
"too many PHIs",
|
||||
"persistent type instability",
|
||||
"failed to allocate mcode memory",
|
||||
"machine code too long",
|
||||
"hit mcode limit (retrying)",
|
||||
"too many spill slots",
|
||||
"inconsistent register allocation",
|
||||
"NYI: cannot assemble IR instruction %d",
|
||||
"NYI: PHI shuffling too complex",
|
||||
"NYI: register coalescing too complex",
|
||||
},
|
||||
|
||||
ffnames = {
|
||||
[0]="Lua",
|
||||
"C",
|
||||
"assert",
|
||||
"type",
|
||||
"next",
|
||||
"pairs",
|
||||
"ipairs_aux",
|
||||
"ipairs",
|
||||
"getmetatable",
|
||||
"setmetatable",
|
||||
"getfenv",
|
||||
"setfenv",
|
||||
"rawget",
|
||||
"rawset",
|
||||
"rawequal",
|
||||
"unpack",
|
||||
"select",
|
||||
"tonumber",
|
||||
"tostring",
|
||||
"error",
|
||||
"pcall",
|
||||
"xpcall",
|
||||
"loadfile",
|
||||
"load",
|
||||
"loadstring",
|
||||
"dofile",
|
||||
"gcinfo",
|
||||
"collectgarbage",
|
||||
"newproxy",
|
||||
"print",
|
||||
"coroutine.status",
|
||||
"coroutine.running",
|
||||
"coroutine.isyieldable",
|
||||
"coroutine.create",
|
||||
"coroutine.yield",
|
||||
"coroutine.resume",
|
||||
"coroutine.wrap_aux",
|
||||
"coroutine.wrap",
|
||||
"math.abs",
|
||||
"math.floor",
|
||||
"math.ceil",
|
||||
"math.sqrt",
|
||||
"math.log10",
|
||||
"math.exp",
|
||||
"math.sin",
|
||||
"math.cos",
|
||||
"math.tan",
|
||||
"math.asin",
|
||||
"math.acos",
|
||||
"math.atan",
|
||||
"math.sinh",
|
||||
"math.cosh",
|
||||
"math.tanh",
|
||||
"math.frexp",
|
||||
"math.modf",
|
||||
"math.log",
|
||||
"math.atan2",
|
||||
"math.pow",
|
||||
"math.fmod",
|
||||
"math.ldexp",
|
||||
"math.min",
|
||||
"math.max",
|
||||
"math.random",
|
||||
"math.randomseed",
|
||||
"bit.tobit",
|
||||
"bit.bnot",
|
||||
"bit.bswap",
|
||||
"bit.lshift",
|
||||
"bit.rshift",
|
||||
"bit.arshift",
|
||||
"bit.rol",
|
||||
"bit.ror",
|
||||
"bit.band",
|
||||
"bit.bor",
|
||||
"bit.bxor",
|
||||
"bit.tohex",
|
||||
"string.byte",
|
||||
"string.char",
|
||||
"string.sub",
|
||||
"string.rep",
|
||||
"string.reverse",
|
||||
"string.lower",
|
||||
"string.upper",
|
||||
"string.dump",
|
||||
"string.find",
|
||||
"string.match",
|
||||
"string.gmatch_aux",
|
||||
"string.gmatch",
|
||||
"string.gsub",
|
||||
"string.format",
|
||||
"table.maxn",
|
||||
"table.insert",
|
||||
"table.concat",
|
||||
"table.sort",
|
||||
"table.new",
|
||||
"table.clear",
|
||||
"io.method.close",
|
||||
"io.method.read",
|
||||
"io.method.write",
|
||||
"io.method.flush",
|
||||
"io.method.seek",
|
||||
"io.method.setvbuf",
|
||||
"io.method.lines",
|
||||
"io.method.__gc",
|
||||
"io.method.__tostring",
|
||||
"io.open",
|
||||
"io.popen",
|
||||
"io.tmpfile",
|
||||
"io.close",
|
||||
"io.read",
|
||||
"io.write",
|
||||
"io.flush",
|
||||
"io.input",
|
||||
"io.output",
|
||||
"io.lines",
|
||||
"io.type",
|
||||
"os.execute",
|
||||
"os.remove",
|
||||
"os.rename",
|
||||
"os.tmpname",
|
||||
"os.getenv",
|
||||
"os.exit",
|
||||
"os.clock",
|
||||
"os.date",
|
||||
"os.time",
|
||||
"os.difftime",
|
||||
"os.setlocale",
|
||||
"debug.getregistry",
|
||||
"debug.getmetatable",
|
||||
"debug.setmetatable",
|
||||
"debug.getfenv",
|
||||
"debug.setfenv",
|
||||
"debug.getinfo",
|
||||
"debug.getlocal",
|
||||
"debug.setlocal",
|
||||
"debug.getupvalue",
|
||||
"debug.setupvalue",
|
||||
"debug.upvalueid",
|
||||
"debug.upvaluejoin",
|
||||
"debug.sethook",
|
||||
"debug.gethook",
|
||||
"debug.debug",
|
||||
"debug.traceback",
|
||||
"jit.on",
|
||||
"jit.off",
|
||||
"jit.flush",
|
||||
"jit.status",
|
||||
"jit.security",
|
||||
"jit.attach",
|
||||
"jit.util.funcinfo",
|
||||
"jit.util.funcbc",
|
||||
"jit.util.funck",
|
||||
"jit.util.funcuvname",
|
||||
"jit.util.traceinfo",
|
||||
"jit.util.traceir",
|
||||
"jit.util.tracek",
|
||||
"jit.util.tracesnap",
|
||||
"jit.util.tracemc",
|
||||
"jit.util.traceexitstub",
|
||||
"jit.util.ircalladdr",
|
||||
"jit.opt.start",
|
||||
"jit.profile.start",
|
||||
"jit.profile.stop",
|
||||
"jit.profile.dumpstack",
|
||||
"ffi.meta.__index",
|
||||
"ffi.meta.__newindex",
|
||||
"ffi.meta.__eq",
|
||||
"ffi.meta.__len",
|
||||
"ffi.meta.__lt",
|
||||
"ffi.meta.__le",
|
||||
"ffi.meta.__concat",
|
||||
"ffi.meta.__call",
|
||||
"ffi.meta.__add",
|
||||
"ffi.meta.__sub",
|
||||
"ffi.meta.__mul",
|
||||
"ffi.meta.__div",
|
||||
"ffi.meta.__mod",
|
||||
"ffi.meta.__pow",
|
||||
"ffi.meta.__unm",
|
||||
"ffi.meta.__tostring",
|
||||
"ffi.meta.__pairs",
|
||||
"ffi.meta.__ipairs",
|
||||
"ffi.clib.__index",
|
||||
"ffi.clib.__newindex",
|
||||
"ffi.clib.__gc",
|
||||
"ffi.callback.free",
|
||||
"ffi.callback.set",
|
||||
"ffi.cdef",
|
||||
"ffi.new",
|
||||
"ffi.cast",
|
||||
"ffi.typeof",
|
||||
"ffi.typeinfo",
|
||||
"ffi.istype",
|
||||
"ffi.sizeof",
|
||||
"ffi.alignof",
|
||||
"ffi.offsetof",
|
||||
"ffi.errno",
|
||||
"ffi.string",
|
||||
"ffi.copy",
|
||||
"ffi.fill",
|
||||
"ffi.abi",
|
||||
"ffi.metatype",
|
||||
"ffi.gc",
|
||||
"ffi.load",
|
||||
"buffer.method.free",
|
||||
"buffer.method.reset",
|
||||
"buffer.method.skip",
|
||||
"buffer.method.set",
|
||||
"buffer.method.put",
|
||||
"buffer.method.putf",
|
||||
"buffer.method.get",
|
||||
"buffer.method.putcdata",
|
||||
"buffer.method.reserve",
|
||||
"buffer.method.commit",
|
||||
"buffer.method.ref",
|
||||
"buffer.method.encode",
|
||||
"buffer.method.decode",
|
||||
"buffer.method.__gc",
|
||||
"buffer.method.__tostring",
|
||||
"buffer.method.__len",
|
||||
"buffer.new",
|
||||
"buffer.encode",
|
||||
"buffer.decode",
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
-- This is a generated file. DO NOT EDIT!
|
||||
|
||||
assert(require("jit").version == "LuaJIT 2.1.1700008891", "LuaJIT core/library version mismatch")
|
||||
|
||||
return {
|
||||
|
||||
bcnames = "ISLT ISGE ISLE ISGT ISEQV ISNEV ISEQS ISNES ISEQN ISNEN ISEQP ISNEP ISTC ISFC IST ISF ISTYPEISNUM MOV NOT UNM LEN ADDVN SUBVN MULVN DIVVN MODVN ADDNV SUBNV MULNV DIVNV MODNV ADDVV SUBVV MULVV DIVVV MODVV POW CAT KSTR KCDATAKSHORTKNUM KPRI KNIL UGET USETV USETS USETN USETP UCLO FNEW TNEW TDUP GGET GSET TGETV TGETS TGETB TGETR TSETV TSETS TSETB TSETM TSETR CALLM CALL CALLMTCALLT ITERC ITERN VARG ISNEXTRETM RET RET0 RET1 FORI JFORI FORL IFORL JFORL ITERL IITERLJITERLLOOP ILOOP JLOOP JMP FUNCF IFUNCFJFUNCFFUNCV IFUNCVJFUNCVFUNCC FUNCCW",
|
||||
|
||||
irnames = "LT GE LE GT ULT UGE ULE UGT EQ NE ABC RETF NOP BASE PVAL GCSTEPHIOP LOOP USE PHI RENAMEPROF KPRI KINT KGC KPTR KKPTR KNULL KNUM KINT64KSLOT BNOT BSWAP BAND BOR BXOR BSHL BSHR BSAR BROL BROR ADD SUB MUL DIV MOD POW NEG ABS LDEXP MIN MAX FPMATHADDOV SUBOV MULOV AREF HREFK HREF NEWREFUREFO UREFC FREF TMPREFSTRREFLREF ALOAD HLOAD ULOAD FLOAD XLOAD SLOAD VLOAD ALEN ASTOREHSTOREUSTOREFSTOREXSTORESNEW XSNEW TNEW TDUP CNEW CNEWI BUFHDRBUFPUTBUFSTRTBAR OBAR XBAR CONV TOBIT TOSTR STRTO CALLN CALLA CALLL CALLS CALLXSCARG ",
|
||||
|
||||
irfpm = { [0]="floor", "ceil", "trunc", "sqrt", "log", "log2", "other", },
|
||||
|
||||
irfield = { [0]="str.len", "func.env", "func.pc", "func.ffid", "thread.env", "tab.meta", "tab.array", "tab.node", "tab.asize", "tab.hmask", "tab.nomm", "udata.meta", "udata.udtype", "udata.file", "sbuf.w", "sbuf.e", "sbuf.b", "sbuf.l", "sbuf.ref", "sbuf.r", "cdata.ctypeid", "cdata.ptr", "cdata.int", "cdata.int64", "cdata.int64_4", },
|
||||
|
||||
ircall = {
|
||||
[0]="lj_str_cmp",
|
||||
"lj_str_find",
|
||||
"lj_str_new",
|
||||
"lj_strscan_num",
|
||||
"lj_strfmt_int",
|
||||
"lj_strfmt_num",
|
||||
"lj_strfmt_char",
|
||||
"lj_strfmt_putint",
|
||||
"lj_strfmt_putnum",
|
||||
"lj_strfmt_putquoted",
|
||||
"lj_strfmt_putfxint",
|
||||
"lj_strfmt_putfnum_int",
|
||||
"lj_strfmt_putfnum_uint",
|
||||
"lj_strfmt_putfnum",
|
||||
"lj_strfmt_putfstr",
|
||||
"lj_strfmt_putfchar",
|
||||
"lj_buf_putmem",
|
||||
"lj_buf_putstr",
|
||||
"lj_buf_putchar",
|
||||
"lj_buf_putstr_reverse",
|
||||
"lj_buf_putstr_lower",
|
||||
"lj_buf_putstr_upper",
|
||||
"lj_buf_putstr_rep",
|
||||
"lj_buf_puttab",
|
||||
"lj_bufx_set",
|
||||
"lj_bufx_more",
|
||||
"lj_serialize_put",
|
||||
"lj_serialize_get",
|
||||
"lj_serialize_encode",
|
||||
"lj_serialize_decode",
|
||||
"lj_buf_tostr",
|
||||
"lj_tab_new_ah",
|
||||
"lj_tab_new1",
|
||||
"lj_tab_dup",
|
||||
"lj_tab_clear",
|
||||
"lj_tab_newkey",
|
||||
"lj_tab_keyindex",
|
||||
"lj_vm_next",
|
||||
"lj_tab_len",
|
||||
"lj_tab_len_hint",
|
||||
"lj_gc_step_jit",
|
||||
"lj_gc_barrieruv",
|
||||
"lj_mem_newgco",
|
||||
"lj_prng_u64d",
|
||||
"lj_vm_modi",
|
||||
"log10",
|
||||
"exp",
|
||||
"sin",
|
||||
"cos",
|
||||
"tan",
|
||||
"asin",
|
||||
"acos",
|
||||
"atan",
|
||||
"sinh",
|
||||
"cosh",
|
||||
"tanh",
|
||||
"fputc",
|
||||
"fwrite",
|
||||
"fflush",
|
||||
"lj_vm_floor",
|
||||
"lj_vm_ceil",
|
||||
"lj_vm_trunc",
|
||||
"sqrt",
|
||||
"log",
|
||||
"lj_vm_log2",
|
||||
"pow",
|
||||
"atan2",
|
||||
"ldexp",
|
||||
"lj_vm_tobit",
|
||||
"softfp_add",
|
||||
"softfp_sub",
|
||||
"softfp_mul",
|
||||
"softfp_div",
|
||||
"softfp_cmp",
|
||||
"softfp_i2d",
|
||||
"softfp_d2i",
|
||||
"lj_vm_sfmin",
|
||||
"lj_vm_sfmax",
|
||||
"lj_vm_tointg",
|
||||
"softfp_ui2d",
|
||||
"softfp_f2d",
|
||||
"softfp_d2ui",
|
||||
"softfp_d2f",
|
||||
"softfp_i2f",
|
||||
"softfp_ui2f",
|
||||
"softfp_f2i",
|
||||
"softfp_f2ui",
|
||||
"fp64_l2d",
|
||||
"fp64_ul2d",
|
||||
"fp64_l2f",
|
||||
"fp64_ul2f",
|
||||
"fp64_d2l",
|
||||
"fp64_d2ul",
|
||||
"fp64_f2l",
|
||||
"fp64_f2ul",
|
||||
"lj_carith_divi64",
|
||||
"lj_carith_divu64",
|
||||
"lj_carith_modi64",
|
||||
"lj_carith_modu64",
|
||||
"lj_carith_powi64",
|
||||
"lj_carith_powu64",
|
||||
"lj_cdata_newv",
|
||||
"lj_cdata_setfin",
|
||||
"strlen",
|
||||
"memcpy",
|
||||
"memset",
|
||||
"lj_vm_errno",
|
||||
"lj_carith_mul64",
|
||||
"lj_carith_shl64",
|
||||
"lj_carith_shr64",
|
||||
"lj_carith_sar64",
|
||||
"lj_carith_rol64",
|
||||
"lj_carith_ror64",
|
||||
},
|
||||
|
||||
traceerr = {
|
||||
[0]="error thrown or hook called during recording",
|
||||
"trace too short",
|
||||
"trace too long",
|
||||
"trace too deep",
|
||||
"too many snapshots",
|
||||
"blacklisted",
|
||||
"retry recording",
|
||||
"NYI: bytecode %d",
|
||||
"leaving loop in root trace",
|
||||
"inner loop in root trace",
|
||||
"loop unroll limit reached",
|
||||
"bad argument type",
|
||||
"JIT compilation disabled for function",
|
||||
"call unroll limit reached",
|
||||
"down-recursion, restarting",
|
||||
"NYI: unsupported variant of FastFunc %s",
|
||||
"NYI: return to lower frame",
|
||||
"store with nil or NaN key",
|
||||
"missing metamethod",
|
||||
"looping index lookup",
|
||||
"NYI: mixed sparse/dense table",
|
||||
"symbol not in cache",
|
||||
"NYI: unsupported C type conversion",
|
||||
"NYI: unsupported C function type",
|
||||
"guard would always fail",
|
||||
"too many PHIs",
|
||||
"persistent type instability",
|
||||
"failed to allocate mcode memory",
|
||||
"machine code too long",
|
||||
"hit mcode limit (retrying)",
|
||||
"too many spill slots",
|
||||
"inconsistent register allocation",
|
||||
"NYI: cannot assemble IR instruction %d",
|
||||
"NYI: PHI shuffling too complex",
|
||||
"NYI: register coalescing too complex",
|
||||
},
|
||||
|
||||
ffnames = {
|
||||
[0]="Lua",
|
||||
"C",
|
||||
"assert",
|
||||
"type",
|
||||
"next",
|
||||
"pairs",
|
||||
"ipairs_aux",
|
||||
"ipairs",
|
||||
"getmetatable",
|
||||
"setmetatable",
|
||||
"getfenv",
|
||||
"setfenv",
|
||||
"rawget",
|
||||
"rawset",
|
||||
"rawequal",
|
||||
"unpack",
|
||||
"select",
|
||||
"tonumber",
|
||||
"tostring",
|
||||
"error",
|
||||
"pcall",
|
||||
"xpcall",
|
||||
"loadfile",
|
||||
"load",
|
||||
"loadstring",
|
||||
"dofile",
|
||||
"gcinfo",
|
||||
"collectgarbage",
|
||||
"newproxy",
|
||||
"print",
|
||||
"coroutine.status",
|
||||
"coroutine.running",
|
||||
"coroutine.isyieldable",
|
||||
"coroutine.create",
|
||||
"coroutine.yield",
|
||||
"coroutine.resume",
|
||||
"coroutine.wrap_aux",
|
||||
"coroutine.wrap",
|
||||
"math.abs",
|
||||
"math.floor",
|
||||
"math.ceil",
|
||||
"math.sqrt",
|
||||
"math.log10",
|
||||
"math.exp",
|
||||
"math.sin",
|
||||
"math.cos",
|
||||
"math.tan",
|
||||
"math.asin",
|
||||
"math.acos",
|
||||
"math.atan",
|
||||
"math.sinh",
|
||||
"math.cosh",
|
||||
"math.tanh",
|
||||
"math.frexp",
|
||||
"math.modf",
|
||||
"math.log",
|
||||
"math.atan2",
|
||||
"math.pow",
|
||||
"math.fmod",
|
||||
"math.ldexp",
|
||||
"math.min",
|
||||
"math.max",
|
||||
"math.random",
|
||||
"math.randomseed",
|
||||
"bit.tobit",
|
||||
"bit.bnot",
|
||||
"bit.bswap",
|
||||
"bit.lshift",
|
||||
"bit.rshift",
|
||||
"bit.arshift",
|
||||
"bit.rol",
|
||||
"bit.ror",
|
||||
"bit.band",
|
||||
"bit.bor",
|
||||
"bit.bxor",
|
||||
"bit.tohex",
|
||||
"string.byte",
|
||||
"string.char",
|
||||
"string.sub",
|
||||
"string.rep",
|
||||
"string.reverse",
|
||||
"string.lower",
|
||||
"string.upper",
|
||||
"string.dump",
|
||||
"string.find",
|
||||
"string.match",
|
||||
"string.gmatch_aux",
|
||||
"string.gmatch",
|
||||
"string.gsub",
|
||||
"string.format",
|
||||
"table.maxn",
|
||||
"table.insert",
|
||||
"table.concat",
|
||||
"table.sort",
|
||||
"table.new",
|
||||
"table.clear",
|
||||
"io.method.close",
|
||||
"io.method.read",
|
||||
"io.method.write",
|
||||
"io.method.flush",
|
||||
"io.method.seek",
|
||||
"io.method.setvbuf",
|
||||
"io.method.lines",
|
||||
"io.method.__gc",
|
||||
"io.method.__tostring",
|
||||
"io.open",
|
||||
"io.popen",
|
||||
"io.tmpfile",
|
||||
"io.close",
|
||||
"io.read",
|
||||
"io.write",
|
||||
"io.flush",
|
||||
"io.input",
|
||||
"io.output",
|
||||
"io.lines",
|
||||
"io.type",
|
||||
"os.execute",
|
||||
"os.remove",
|
||||
"os.rename",
|
||||
"os.tmpname",
|
||||
"os.getenv",
|
||||
"os.exit",
|
||||
"os.clock",
|
||||
"os.date",
|
||||
"os.time",
|
||||
"os.difftime",
|
||||
"os.setlocale",
|
||||
"debug.getregistry",
|
||||
"debug.getmetatable",
|
||||
"debug.setmetatable",
|
||||
"debug.getfenv",
|
||||
"debug.setfenv",
|
||||
"debug.getinfo",
|
||||
"debug.getlocal",
|
||||
"debug.setlocal",
|
||||
"debug.getupvalue",
|
||||
"debug.setupvalue",
|
||||
"debug.upvalueid",
|
||||
"debug.upvaluejoin",
|
||||
"debug.sethook",
|
||||
"debug.gethook",
|
||||
"debug.debug",
|
||||
"debug.traceback",
|
||||
"jit.on",
|
||||
"jit.off",
|
||||
"jit.flush",
|
||||
"jit.status",
|
||||
"jit.security",
|
||||
"jit.attach",
|
||||
"jit.util.funcinfo",
|
||||
"jit.util.funcbc",
|
||||
"jit.util.funck",
|
||||
"jit.util.funcuvname",
|
||||
"jit.util.traceinfo",
|
||||
"jit.util.traceir",
|
||||
"jit.util.tracek",
|
||||
"jit.util.tracesnap",
|
||||
"jit.util.tracemc",
|
||||
"jit.util.traceexitstub",
|
||||
"jit.util.ircalladdr",
|
||||
"jit.opt.start",
|
||||
"jit.profile.start",
|
||||
"jit.profile.stop",
|
||||
"jit.profile.dumpstack",
|
||||
"ffi.meta.__index",
|
||||
"ffi.meta.__newindex",
|
||||
"ffi.meta.__eq",
|
||||
"ffi.meta.__len",
|
||||
"ffi.meta.__lt",
|
||||
"ffi.meta.__le",
|
||||
"ffi.meta.__concat",
|
||||
"ffi.meta.__call",
|
||||
"ffi.meta.__add",
|
||||
"ffi.meta.__sub",
|
||||
"ffi.meta.__mul",
|
||||
"ffi.meta.__div",
|
||||
"ffi.meta.__mod",
|
||||
"ffi.meta.__pow",
|
||||
"ffi.meta.__unm",
|
||||
"ffi.meta.__tostring",
|
||||
"ffi.meta.__pairs",
|
||||
"ffi.meta.__ipairs",
|
||||
"ffi.clib.__index",
|
||||
"ffi.clib.__newindex",
|
||||
"ffi.clib.__gc",
|
||||
"ffi.callback.free",
|
||||
"ffi.callback.set",
|
||||
"ffi.cdef",
|
||||
"ffi.new",
|
||||
"ffi.cast",
|
||||
"ffi.typeof",
|
||||
"ffi.typeinfo",
|
||||
"ffi.istype",
|
||||
"ffi.sizeof",
|
||||
"ffi.alignof",
|
||||
"ffi.offsetof",
|
||||
"ffi.errno",
|
||||
"ffi.string",
|
||||
"ffi.copy",
|
||||
"ffi.fill",
|
||||
"ffi.abi",
|
||||
"ffi.metatype",
|
||||
"ffi.gc",
|
||||
"ffi.load",
|
||||
"buffer.method.free",
|
||||
"buffer.method.reset",
|
||||
"buffer.method.skip",
|
||||
"buffer.method.set",
|
||||
"buffer.method.put",
|
||||
"buffer.method.putf",
|
||||
"buffer.method.get",
|
||||
"buffer.method.putcdata",
|
||||
"buffer.method.reserve",
|
||||
"buffer.method.commit",
|
||||
"buffer.method.ref",
|
||||
"buffer.method.encode",
|
||||
"buffer.method.decode",
|
||||
"buffer.method.__gc",
|
||||
"buffer.method.__tostring",
|
||||
"buffer.method.__len",
|
||||
"buffer.new",
|
||||
"buffer.encode",
|
||||
"buffer.decode",
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT profiler zones.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
** LuaJIT -- a Just-In-Time Compiler for Lua. https://luajit.org/
|
||||
**
|
||||
** Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining
|
||||
** a copy of this software and associated documentation files (the
|
||||
** "Software"), to deal in the Software without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Software, and to
|
||||
** permit persons to whom the Software is furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be
|
||||
** included in all copies or substantial portions of the Software.
|
||||
**
|
||||
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
**
|
||||
** [ MIT license: https://www.opensource.org/licenses/mit-license.php ]
|
||||
*/
|
||||
|
||||
#ifndef _LUAJIT_H
|
||||
#define _LUAJIT_H
|
||||
|
||||
#include "lua.h"
|
||||
|
||||
#define LUAJIT_VERSION "LuaJIT 2.1.1700008891"
|
||||
#define LUAJIT_VERSION_NUM 20199 /* Deprecated. */
|
||||
#define LUAJIT_VERSION_SYM luaJIT_version_2_1_1700008891
|
||||
#define LUAJIT_COPYRIGHT "Copyright (C) 2005-2023 Mike Pall"
|
||||
#define LUAJIT_URL "https://luajit.org/"
|
||||
|
||||
/* Modes for luaJIT_setmode. */
|
||||
#define LUAJIT_MODE_MASK 0x00ff
|
||||
|
||||
enum {
|
||||
LUAJIT_MODE_ENGINE, /* Set mode for whole JIT engine. */
|
||||
LUAJIT_MODE_DEBUG, /* Set debug mode (idx = level). */
|
||||
|
||||
LUAJIT_MODE_FUNC, /* Change mode for a function. */
|
||||
LUAJIT_MODE_ALLFUNC, /* Recurse into subroutine protos. */
|
||||
LUAJIT_MODE_ALLSUBFUNC, /* Change only the subroutines. */
|
||||
|
||||
LUAJIT_MODE_TRACE, /* Flush a compiled trace. */
|
||||
|
||||
LUAJIT_MODE_WRAPCFUNC = 0x10, /* Set wrapper mode for C function calls. */
|
||||
|
||||
LUAJIT_MODE_MAX
|
||||
};
|
||||
|
||||
/* Flags or'ed in to the mode. */
|
||||
#define LUAJIT_MODE_OFF 0x0000 /* Turn feature off. */
|
||||
#define LUAJIT_MODE_ON 0x0100 /* Turn feature on. */
|
||||
#define LUAJIT_MODE_FLUSH 0x0200 /* Flush JIT-compiled code. */
|
||||
|
||||
/* LuaJIT public C API. */
|
||||
|
||||
/* Control the JIT engine. */
|
||||
LUA_API int luaJIT_setmode(lua_State *L, int idx, int mode);
|
||||
|
||||
/* Low-overhead profiling API. */
|
||||
typedef void (*luaJIT_profile_callback)(void *data, lua_State *L,
|
||||
int samples, int vmstate);
|
||||
LUA_API void luaJIT_profile_start(lua_State *L, const char *mode,
|
||||
luaJIT_profile_callback cb, void *data);
|
||||
LUA_API void luaJIT_profile_stop(lua_State *L);
|
||||
LUA_API const char *luaJIT_profile_dumpstack(lua_State *L, const char *fmt,
|
||||
int depth, size_t *len);
|
||||
|
||||
/* Enforce (dynamic) linker error for version mismatches. Call from main. */
|
||||
LUA_API void LUAJIT_VERSION_SYM(void);
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT bytecode listing module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -41,7 +41,6 @@
|
||||
|
||||
-- Cache some library functions and objects.
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
local jutil = require("jit.util")
|
||||
local vmdef = require("jit.vmdef")
|
||||
local bit = require("bit")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT module to save/list bytecode.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -11,7 +11,7 @@
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
assert(jit.version_num == 20199, "LuaJIT core/library version mismatch")
|
||||
local bit = require("bit")
|
||||
|
||||
-- Symbol name prefix for LuaJIT bytecode.
|
||||
@@ -33,11 +33,12 @@ Save LuaJIT bytecode: luajit -b[options] input output
|
||||
-t type Set output file type (default: auto-detect from output name).
|
||||
-a arch Override architecture for object files (default: native).
|
||||
-o os Override OS for object files (default: native).
|
||||
-F name Override filename (default: input filename).
|
||||
-e chunk Use chunk string as input.
|
||||
-- Stop handling options.
|
||||
- Use stdin as input and/or stdout as output.
|
||||
|
||||
File types: c h obj o raw (default)
|
||||
File types: c cc h obj o raw (default)
|
||||
]]
|
||||
os.exit(1)
|
||||
end
|
||||
@@ -49,10 +50,22 @@ local function check(ok, ...)
|
||||
os.exit(1)
|
||||
end
|
||||
|
||||
local function readfile(input)
|
||||
local function readfile(ctx, input)
|
||||
if type(input) == "function" then return input end
|
||||
if input == "-" then input = nil end
|
||||
return check(loadfile(input))
|
||||
if ctx.filename then
|
||||
local data
|
||||
if input == "-" then
|
||||
data = io.stdin:read("*a")
|
||||
else
|
||||
local fp = assert(io.open(input, "rb"))
|
||||
data = assert(fp:read("*a"))
|
||||
assert(fp:close())
|
||||
end
|
||||
return check(load(data, ctx.filename))
|
||||
else
|
||||
if input == "-" then input = nil end
|
||||
return check(loadfile(input))
|
||||
end
|
||||
end
|
||||
|
||||
local function savefile(name, mode)
|
||||
@@ -68,7 +81,7 @@ end
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
local map_type = {
|
||||
raw = "raw", c = "c", h = "h", o = "obj", obj = "obj",
|
||||
raw = "raw", c = "c", cc = "c", h = "h", o = "obj", obj = "obj",
|
||||
}
|
||||
|
||||
local map_arch = {
|
||||
@@ -456,18 +469,18 @@ typedef struct {
|
||||
uint32_t value;
|
||||
} mach_nlist;
|
||||
typedef struct {
|
||||
uint32_t strx;
|
||||
int32_t strx;
|
||||
uint8_t type, sect;
|
||||
uint16_t desc;
|
||||
uint64_t value;
|
||||
} mach_nlist_64;
|
||||
typedef struct
|
||||
{
|
||||
uint32_t magic, nfat_arch;
|
||||
int32_t magic, nfat_arch;
|
||||
} mach_fat_header;
|
||||
typedef struct
|
||||
{
|
||||
uint32_t cputype, cpusubtype, offset, size, align;
|
||||
int32_t cputype, cpusubtype, offset, size, align;
|
||||
} mach_fat_arch;
|
||||
typedef struct {
|
||||
struct {
|
||||
@@ -501,6 +514,18 @@ typedef struct {
|
||||
mach_nlist sym_entry;
|
||||
uint8_t space[4096];
|
||||
} mach_fat_obj;
|
||||
typedef struct {
|
||||
mach_fat_header fat;
|
||||
mach_fat_arch fat_arch[2];
|
||||
struct {
|
||||
mach_header_64 hdr;
|
||||
mach_segment_command_64 seg;
|
||||
mach_section_64 sec;
|
||||
mach_symtab_command sym;
|
||||
} arch[2];
|
||||
mach_nlist_64 sym_entry;
|
||||
uint8_t space[4096];
|
||||
} mach_fat_obj_64;
|
||||
]]
|
||||
local symname = '_'..LJBC_PREFIX..ctx.modname
|
||||
local isfat, is64, align, mobj = false, false, 4, "mach_obj"
|
||||
@@ -509,7 +534,7 @@ typedef struct {
|
||||
elseif ctx.arch == "arm" then
|
||||
isfat, mobj = true, "mach_fat_obj"
|
||||
elseif ctx.arch == "arm64" then
|
||||
is64, align, isfat, mobj = true, 8, true, "mach_fat_obj"
|
||||
is64, align, isfat, mobj = true, 8, true, "mach_fat_obj_64"
|
||||
else
|
||||
check(ctx.arch == "x86", "unsupported architecture for OSX")
|
||||
end
|
||||
@@ -592,13 +617,13 @@ end
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
local function bclist(input, output)
|
||||
local f = readfile(input)
|
||||
local function bclist(ctx, input, output)
|
||||
local f = readfile(ctx, input)
|
||||
require("jit.bc").dump(f, savefile(output, "w"), true)
|
||||
end
|
||||
|
||||
local function bcsave(ctx, input, output)
|
||||
local f = readfile(input)
|
||||
local f = readfile(ctx, input)
|
||||
local s = string.dump(f, ctx.strip)
|
||||
local t = ctx.type
|
||||
if not t then
|
||||
@@ -651,6 +676,8 @@ local function docmd(...)
|
||||
ctx.arch = checkarg(tremove(arg, n), map_arch, "architecture")
|
||||
elseif opt == "o" then
|
||||
ctx.os = checkarg(tremove(arg, n), map_os, "OS name")
|
||||
elseif opt == "F" then
|
||||
ctx.filename = "@"..tremove(arg, n)
|
||||
else
|
||||
usage()
|
||||
end
|
||||
@@ -662,7 +689,7 @@ local function docmd(...)
|
||||
end
|
||||
if list then
|
||||
if #arg == 0 or #arg > 2 then usage() end
|
||||
bclist(arg[1], arg[2] or "-")
|
||||
bclist(ctx, arg[1], arg[2] or "-")
|
||||
else
|
||||
if #arg ~= 2 then usage() end
|
||||
bcsave(ctx, arg[1], arg[2])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT ARM disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT ARM64 disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
--
|
||||
-- Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com.
|
||||
@@ -107,24 +107,20 @@ local map_logsr = { -- Logical, shifted register.
|
||||
[0] = {
|
||||
shift = 29, mask = 3,
|
||||
[0] = {
|
||||
shift = 21, mask = 7,
|
||||
[0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg",
|
||||
"andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "andDNMSg", "bicDNMSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] ="orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg",
|
||||
"orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg",
|
||||
"eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "eorDNMSg", "eonDNMSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg",
|
||||
"ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "ands|tstD0NMSg", "bicsDNMSg"
|
||||
}
|
||||
},
|
||||
false -- unallocated
|
||||
@@ -132,24 +128,20 @@ local map_logsr = { -- Logical, shifted register.
|
||||
{
|
||||
shift = 29, mask = 3,
|
||||
[0] = {
|
||||
shift = 21, mask = 7,
|
||||
[0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg",
|
||||
"andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "andDNMSg", "bicDNMSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg",
|
||||
"orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg",
|
||||
"eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "eorDNMSg", "eonDNMSg"
|
||||
},
|
||||
{
|
||||
shift = 21, mask = 7,
|
||||
[0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg",
|
||||
"ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg"
|
||||
shift = 21, mask = 1,
|
||||
[0] = "ands|tstD0NMSg", "bicsDNMSg"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -735,7 +727,7 @@ local map_cond = {
|
||||
"hi", "ls", "ge", "lt", "gt", "le", "al",
|
||||
}
|
||||
|
||||
local map_shift = { [0] = "lsl", "lsr", "asr", }
|
||||
local map_shift = { [0] = "lsl", "lsr", "asr", "ror"}
|
||||
|
||||
local map_extend = {
|
||||
[0] = "uxtb", "uxth", "uxtw", "uxtx", "sxtb", "sxth", "sxtw", "sxtx",
|
||||
@@ -956,7 +948,7 @@ local function disass_ins(ctx)
|
||||
elseif p == "U" then
|
||||
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
||||
local sz = band(rshift(op, 30), 3)
|
||||
local imm12 = lshift(arshift(lshift(op, 10), 20), sz)
|
||||
local imm12 = lshift(rshift(lshift(op, 10), 20), sz)
|
||||
if imm12 ~= 0 then
|
||||
x = "["..rn..", #"..imm12.."]"
|
||||
else
|
||||
@@ -993,8 +985,7 @@ local function disass_ins(ctx)
|
||||
x = x.."]"
|
||||
end
|
||||
elseif p == "P" then
|
||||
local opcv, sh = rshift(op, 26), 2
|
||||
if opcv >= 0x2a then sh = 4 elseif opcv >= 0x1b then sh = 3 end
|
||||
local sh = 2 + rshift(op, 31 - band(rshift(op, 26), 1))
|
||||
local imm7 = lshift(arshift(lshift(op, 10), 25), sh)
|
||||
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
||||
local ind = band(rshift(op, 23), 3)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT ARM64BE disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- ARM64 instructions are always little-endian. So just forward to the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT/X license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS64 disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the big-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS64EL disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the little-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS64R6 disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the r6 big-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPS64R6EL disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the r6 little-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT MIPSEL disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the little-endian functions from the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT PPC disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT/X license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT x64 disassembler wrapper module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This module just exports the 64 bit functions from the combined
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT x86/x64 disassembler module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT compiler dump module.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -55,7 +55,6 @@
|
||||
|
||||
-- Cache some library functions and objects.
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
local jutil = require("jit.util")
|
||||
local vmdef = require("jit.vmdef")
|
||||
local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
----------------------------------------------------------------------------
|
||||
-- LuaJIT profiler.
|
||||
--
|
||||
-- Copyright (C) 2005-2021 Mike Pall. All rights reserved.
|
||||
-- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
|
||||
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||
----------------------------------------------------------------------------
|
||||
--
|
||||
@@ -41,7 +41,6 @@
|
||||
|
||||
-- Cache some library functions and objects.
|
||||
local jit = require("jit")
|
||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
||||
local profile = require("jit.profile")
|
||||
local vmdef = require("jit.vmdef")
|
||||
local math = math
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user