mirror of
https://github.com/love2d/love-android.git
synced 2026-08-15 07:41:26 +02:00
Compare commits
57 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 55feb38fa1 | |||
| 6811eca7d2 | |||
| d1f74df686 | |||
| c3ed3b454b | |||
| 8a3d635cdb | |||
| a81931be2c | |||
| 7a0068535b | |||
| 034a6d6361 | |||
| 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,44 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Setup Java 11
|
- name: Setup Java 17
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
distribution: adopt-hotspot
|
distribution: adopt-hotspot
|
||||||
java-version: 11
|
java-version: 17
|
||||||
cache: gradle
|
cache: gradle
|
||||||
- name: Build
|
- name: Build
|
||||||
run: bash ./gradlew assembleNormalRecord assembleEmbedRelease bundleNormalNoRecordRelease bundleEmbedRecordRelease bundleEmbedNoRecordRelease
|
run: bash ./gradlew assembleNormalRecord assembleEmbedRelease bundleNormalNoRecordRelease bundleEmbedRecordRelease bundleEmbedNoRecordRelease
|
||||||
- name: Artifact (Normal debug APK)
|
- name: Artifact (Normal debug APK)
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: love-android-debug.apk
|
name: love-android-debug.apk
|
||||||
path: app/build/outputs/apk/normalRecord/debug/app-normal-record-debug.apk
|
path: app/build/outputs/apk/normalRecord/debug/app-normal-record-debug.apk
|
||||||
- name: Artifact (Normal unsigned APK)
|
- name: Artifact (Normal unsigned APK)
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: love-android.apk
|
name: love-android.apk
|
||||||
path: app/build/outputs/apk/normalRecord/release/app-normal-record-release-unsigned.apk
|
path: app/build/outputs/apk/normalRecord/release/app-normal-record-release-unsigned.apk
|
||||||
- name: Artifact (Normal AAB w/o recording)
|
- name: Artifact (Normal AAB w/o recording)
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: love-android-ps.aab
|
name: love-android-ps.aab
|
||||||
path: app/build/outputs/bundle/normalNoRecordRelease/app-normal-noRecord-release.aab
|
path: app/build/outputs/bundle/normalNoRecordRelease/app-normal-noRecord-release.aab
|
||||||
- name: Artifact (Embed AAB)
|
- name: Artifact (Embed AAB)
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: love-android-embed-record.aab
|
name: love-android-embed-record.aab
|
||||||
path: app/build/outputs/bundle/embedRecordRelease/app-embed-record-release.aab
|
path: app/build/outputs/bundle/embedRecordRelease/app-embed-record-release.aab
|
||||||
- name: Artifact (Embed AAB w/o recording)
|
- name: Artifact (Embed AAB w/o recording)
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: love-android-embed.aab
|
name: love-android-embed.aab
|
||||||
path: app/build/outputs/bundle/embedNoRecordRelease/app-embed-noRecord-release.aab
|
path: app/build/outputs/bundle/embedNoRecordRelease/app-embed-noRecord-release.aab
|
||||||
|
- name: Artifact (Debug symbols)
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: love-android-unstripped-debugsyms
|
||||||
|
path: love/build/intermediates/library_jni
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Android Port of LÖVE, an awesome 2D game engine for Lua (http://love2d.org)
|
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:
|
Download:
|
||||||
---------
|
---------
|
||||||
@@ -38,33 +38,33 @@ Detailed instructions can be viewed at https://github.com/love2d/love-android/wi
|
|||||||
Quick Start:
|
Quick Start:
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Before you start, install JDK 11 or later. If you intend to build from Android Studio, skip this step as
|
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 11.
|
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
|
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.
|
`ANDROID_SDK_ROOT` to your Android SDK location and run:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ ./gradlew assembleNormalRecord
|
$ ./gradlew assembleNormalRecord
|
||||||
```
|
```
|
||||||
|
|
||||||
in the root folder of this project. This should give you a .apk file in the `app/build/outputs/apk/normalRecord`
|
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 flavor is what you normally have
|
subdirectory that you can then sign and install on your phone. The `normalRecord` .apk variant is what you normally have
|
||||||
when downloading one from https://love2d.org.
|
when downloading APK from https://love2d.org.
|
||||||
|
|
||||||
If you want to put your game inside the APK, you can either:
|
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
|
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`
|
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,
|
[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
|
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
|
generate APK which you can install or `gradlew bundleEmbedNoRecordRelease` (or `gradlew bundleEmbedRecordRelease`) to generate
|
||||||
AAB which you can upload to Play Store.
|
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
|
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 21.3.6528147. After that, open
|
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.
|
the repository root.
|
||||||
|
|
||||||
Notice: Previously, the embed + APKTool method is preferred, but recent announcements by Google render that method obsolete.
|
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-android/issues - LÖVE-Android-specific issues
|
||||||
* https://github.com/love2d/love/issues - for LÖVE in general
|
* 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:
|
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:
|
11.4:
|
||||||
|
|
||||||
* Contains all relevant changes for desktop LÖVE [11.4](https://love2d.org/wiki/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'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 31
|
namespace "org.love2d.android.executable"
|
||||||
buildToolsVersion '31.0.0'
|
ndkVersion '25.2.9519653'
|
||||||
ndkVersion '21.3.6528147'
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId 'org.love2d.android'
|
applicationId project.properties["app.application_id"]
|
||||||
versionCode 30
|
versionCode project.properties["app.version_code"].toInteger()
|
||||||
versionName '11.4'
|
versionName project.properties["app.version_name"]
|
||||||
minSdkVersion 16
|
minSdk 16
|
||||||
targetSdkVersion 31
|
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 {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
@@ -17,7 +44,7 @@ android {
|
|||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
flavorDimensions 'mode', 'recording'
|
flavorDimensions = ['mode', 'recording']
|
||||||
productFlavors {
|
productFlavors {
|
||||||
normal {
|
normal {
|
||||||
dimension 'mode'
|
dimension 'mode'
|
||||||
@@ -32,7 +59,7 @@ android {
|
|||||||
dimension 'recording'
|
dimension 'recording'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lintOptions {
|
lint {
|
||||||
abortOnError false
|
abortOnError false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,6 +67,6 @@ android {
|
|||||||
dependencies {
|
dependencies {
|
||||||
api 'androidx.multidex:multidex:2.0.1'
|
api 'androidx.multidex:multidex:2.0.1'
|
||||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
api fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
api 'androidx.appcompat:appcompat:1.4.0'
|
api 'androidx.appcompat:appcompat:1.6.1'
|
||||||
api project(':love')
|
api project(':love')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
package="org.love2d.android.executable"
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android" >
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||||
@@ -25,15 +23,15 @@
|
|||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@drawable/love"
|
android:icon="@drawable/love"
|
||||||
android:label="LÖVE for Android"
|
android:label="${NAME}"
|
||||||
android:usesCleartextTraffic="true" >
|
android:usesCleartextTraffic="true" >
|
||||||
<activity
|
<activity
|
||||||
android:name="org.love2d.android.GameActivity"
|
android:name="org.love2d.android.GameActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden|navigation"
|
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden|navigation"
|
||||||
android:label="LÖVE for Android"
|
android:label="${NAME}"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleInstance"
|
||||||
android:screenOrientation="landscape"
|
android:screenOrientation="${ORIENTATION}"
|
||||||
android:resizeableActivity="false"
|
android:resizeableActivity="false"
|
||||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
|
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -46,4 +44,4 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.love2d.android.executable"
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
>
|
>
|
||||||
<uses-permission android:name="android.permission.RECORD_AUDIO" tools:node="remove" />
|
<uses-permission android:name="android.permission.RECORD_AUDIO" tools:node="remove" />
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.love2d.android.executable"
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools" >
|
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.READ_EXTERNAL_STORAGE" android:maxSdkVersion="28" />
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28" tools:replace="maxSdkVersion" />
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28" tools:replace="maxSdkVersion" />
|
||||||
@@ -54,5 +52,17 @@
|
|||||||
android:pathPattern=".*\\.love" />
|
android:pathPattern=".*\\.love" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</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>
|
</application>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ buildscript {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
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
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
|||||||
+19
-2
@@ -1,2 +1,19 @@
|
|||||||
android.enableJetifier=true
|
# To set the application display name, only define either `app.name` or `app.name_byte_array`.
|
||||||
android.useAndroidX=true
|
# 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=32
|
||||||
|
app.version_name=11.5a
|
||||||
|
|
||||||
|
# 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
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
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
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright © 2015-2021 the original authors.
|
# Copyright © 2015-2021 the original authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with 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
|
# Busybox and similar reduced shells will NOT work, because this script
|
||||||
# requires all of these POSIX shell features:
|
# requires all of these POSIX shell features:
|
||||||
# * functions;
|
# * functions;
|
||||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||||
# * compound commands having a testable exit status, especially «case»;
|
# * compound commands having a testable exit status, especially «case»;
|
||||||
# * various built-in commands including «command», «set», and «ulimit».
|
# * various built-in commands including «command», «set», and «ulimit».
|
||||||
#
|
#
|
||||||
# Important for patching:
|
# Important for patching:
|
||||||
#
|
#
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (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.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
@@ -80,10 +80,10 @@ do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
# This is normally unused
|
||||||
|
# shellcheck disable=SC2034
|
||||||
APP_NAME="Gradle"
|
|
||||||
APP_BASE_NAME=${0##*/}
|
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.
|
# 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"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
@@ -143,12 +143,16 @@ fi
|
|||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
max*)
|
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 ) ||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
warn "Could not query maximum file descriptor limit"
|
warn "Could not query maximum file descriptor limit"
|
||||||
esac
|
esac
|
||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
'' | soft) :;; #(
|
'' | 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" ||
|
ulimit -n "$MAX_FD" ||
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
esac
|
esac
|
||||||
@@ -205,6 +209,12 @@ set -- \
|
|||||||
org.gradle.wrapper.GradleWrapperMain \
|
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.
|
# Use "xargs" to parse quoted args.
|
||||||
#
|
#
|
||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
# 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 limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@@ -25,7 +25,8 @@
|
|||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
|
@rem This is normally unused
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
@@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
|||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
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
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
exit /b 1
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|||||||
+173
-2
@@ -6,17 +6,22 @@ This distribution contains code from the following projects (full license text b
|
|||||||
- LOVE
|
- LOVE
|
||||||
Website: https://love2d.org/
|
Website: https://love2d.org/
|
||||||
License: zlib
|
License: zlib
|
||||||
Copyright (c) 2006-2022 LOVE Development Team
|
Copyright (c) 2006-2023 LOVE Development Team
|
||||||
|
|
||||||
- ENet
|
- ENet
|
||||||
Website: http://enet.bespin.org/index.html
|
Website: http://enet.bespin.org/index.html
|
||||||
License: MIT/Expat
|
License: MIT/Expat
|
||||||
Copyright (c) 2002-2016 Lee Salzman
|
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
|
- GLAD
|
||||||
Website: http://glad.dav1d.de/
|
Website: http://glad.dav1d.de/
|
||||||
License: MIT/Expat
|
License: MIT/Expat
|
||||||
Copyright (c) 2013 David Herberth, modified by Alex Szpakowski
|
Copyright (c) 2013 David Herberth, modified by Sasha Szpakowski
|
||||||
|
|
||||||
- glslang
|
- glslang
|
||||||
Website: https://github.com/KhronosGroup/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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
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
|
3-Clause BSD
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
|
|||||||
+22
-15
@@ -6,14 +6,13 @@ android {
|
|||||||
// See https://code.google.com/p/android/issues/detail?id=52962
|
// 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
|
// and http://stackoverflow.com/questions/27277433/why-does-gradle-build-my-module-in-release-mode-when-the-app-is-in-debug
|
||||||
// defaultPublishConfig "debug"
|
// defaultPublishConfig "debug"
|
||||||
compileSdkVersion 31
|
namespace "org.love2d.android"
|
||||||
buildToolsVersion '31.0.0'
|
ndkVersion '25.2.9519653'
|
||||||
ndkVersion '21.3.6528147'
|
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
compileSdkVersion 31
|
minSdk 16
|
||||||
buildToolsVersion '31.0.0'
|
compileSdk 34
|
||||||
minSdkVersion 16
|
targetSdk 34
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
ndkBuild {
|
ndkBuild {
|
||||||
arguments "-j" + Runtime.runtime.availableProcessors()
|
arguments "-j" + Runtime.runtime.availableProcessors()
|
||||||
@@ -22,10 +21,10 @@ android {
|
|||||||
ndk {
|
ndk {
|
||||||
// Specifies the ABI configurations of your native
|
// Specifies the ABI configurations of your native
|
||||||
// libraries Gradle should build and package with your APK.
|
// libraries Gradle should build and package with your APK.
|
||||||
|
// noinspection ChromeOsAbiSupport
|
||||||
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
||||||
debugSymbolLevel 'SYMBOL_TABLE'
|
debugSymbolLevel 'SYMBOL_TABLE'
|
||||||
}
|
}
|
||||||
targetSdkVersion 31
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def retrieveAll3pModules = { ->
|
def retrieveAll3pModules = { ->
|
||||||
@@ -34,6 +33,7 @@ android {
|
|||||||
fileTree("src/jni/lua-modules").visit { FileVisitDetails details ->
|
fileTree("src/jni/lua-modules").visit { FileVisitDetails details ->
|
||||||
if (details.isDirectory()) {
|
if (details.isDirectory()) {
|
||||||
if (file(details.file.path + "/Android.mk").exists()) {
|
if (file(details.file.path + "/Android.mk").exists()) {
|
||||||
|
def logger = project.getLogger()
|
||||||
logger.lifecycle("3rd-party module: " + details.file.path)
|
logger.lifecycle("3rd-party module: " + details.file.path)
|
||||||
|
|
||||||
def javainfo = file(details.file.path + "/java.txt")
|
def javainfo = file(details.file.path + "/java.txt")
|
||||||
@@ -41,7 +41,7 @@ android {
|
|||||||
def fstream = new FileInputStream(javainfo)
|
def fstream = new FileInputStream(javainfo)
|
||||||
def infile = new BufferedReader(new InputStreamReader(fstream))
|
def infile = new BufferedReader(new InputStreamReader(fstream))
|
||||||
def javapath = infile.readLine().replace("\\", "/")
|
def javapath = infile.readLine().replace("\\", "/")
|
||||||
def mpath = null
|
def mpath = ""
|
||||||
|
|
||||||
if (javapath[0] != '/') {
|
if (javapath[0] != '/') {
|
||||||
mpath = details.file.path + "/" + javapath
|
mpath = details.file.path + "/" + javapath
|
||||||
@@ -68,11 +68,12 @@ android {
|
|||||||
}
|
}
|
||||||
debug {
|
debug {
|
||||||
ndk {
|
ndk {
|
||||||
|
// noinspection ChromeOsAbiSupport
|
||||||
abiFilters += 'x86_64'
|
abiFilters += 'x86_64'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
flavorDimensions 'mode'
|
flavorDimensions = ['mode']
|
||||||
productFlavors {
|
productFlavors {
|
||||||
normal {
|
normal {
|
||||||
dimension 'mode'
|
dimension 'mode'
|
||||||
@@ -100,16 +101,22 @@ android {
|
|||||||
path 'src/jni/Android.mk'
|
path 'src/jni/Android.mk'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lintOptions {
|
|
||||||
abortOnError false
|
|
||||||
}
|
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
exclude 'lib/arm64-v8a/libSDL2.so'
|
jniLibs {
|
||||||
exclude 'lib/armeabi-v7a/libSDL2.so'
|
excludes += [
|
||||||
|
'lib/arm64-v8a/libSDL2.so',
|
||||||
|
'lib/armeabi-v7a/libSDL2.so',
|
||||||
|
'lib/x86_64/libSDL2.so',
|
||||||
|
'lib/x86/libSDL2.so'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lint {
|
||||||
|
abortOnError false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api fileTree(dir: 'libs', include: ['*.jar'])
|
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)
|
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)
|
ifeq ($(OS),Windows_NT)
|
||||||
HAS_LOVE := $(shell python ${LOVE_JNI_DIR}/detect_love.py ${LOVE_JNI_DIR})
|
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)
|
ifneq (${HAS_LOVE},yes)
|
||||||
$(error Missing LOVE. Make sure to initialize the submodule correctly!)
|
$(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_MODULE := libluajit
|
||||||
LOCAL_SRC_FILES := android/$(TARGET_ARCH_ABI)/libluajit.a
|
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)
|
include $(PREBUILT_STATIC_LIBRARY)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
===============================================================================
|
===============================================================================
|
||||||
LuaJIT -- a Just-In-Time Compiler for Lua. https://luajit.org/
|
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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
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 MSVC, please follow the instructions given in src/msvcbuild.bat.
|
||||||
# For MinGW and Cygwin, cd to src and run make with the Makefile there.
|
# 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
|
MAJVER= 2
|
||||||
MINVER= 1
|
MINVER= 1
|
||||||
RELVER= 0
|
|
||||||
PREREL= -beta3
|
|
||||||
VERSION= $(MAJVER).$(MINVER).$(RELVER)$(PREREL)
|
|
||||||
ABIVER= 5.1
|
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
|
# Change the installation path as needed. This automatically adjusts
|
||||||
@@ -33,9 +38,10 @@ DPREFIX= $(DESTDIR)$(PREFIX)
|
|||||||
INSTALL_BIN= $(DPREFIX)/bin
|
INSTALL_BIN= $(DPREFIX)/bin
|
||||||
INSTALL_LIB= $(DPREFIX)/$(MULTILIB)
|
INSTALL_LIB= $(DPREFIX)/$(MULTILIB)
|
||||||
INSTALL_SHARE= $(DPREFIX)/share
|
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_JITLIB= $(INSTALL_LJLIBD)/jit
|
||||||
INSTALL_LMODD= $(INSTALL_SHARE)/lua
|
INSTALL_LMODD= $(INSTALL_SHARE)/lua
|
||||||
INSTALL_LMOD= $(INSTALL_LMODD)/$(ABIVER)
|
INSTALL_LMOD= $(INSTALL_LMODD)/$(ABIVER)
|
||||||
@@ -49,10 +55,10 @@ INSTALL_TSYMNAME= luajit
|
|||||||
INSTALL_ANAME= libluajit-$(ABIVER).a
|
INSTALL_ANAME= libluajit-$(ABIVER).a
|
||||||
INSTALL_SOSHORT1= libluajit-$(ABIVER).so
|
INSTALL_SOSHORT1= libluajit-$(ABIVER).so
|
||||||
INSTALL_SOSHORT2= libluajit-$(ABIVER).so.$(MAJVER)
|
INSTALL_SOSHORT2= libluajit-$(ABIVER).so.$(MAJVER)
|
||||||
INSTALL_SONAME= $(INSTALL_SOSHORT2).$(MINVER).$(RELVER)
|
INSTALL_SONAME= libluajit-$(ABIVER).so.$(VERSION)
|
||||||
INSTALL_DYLIBSHORT1= libluajit-$(ABIVER).dylib
|
INSTALL_DYLIBSHORT1= libluajit-$(ABIVER).dylib
|
||||||
INSTALL_DYLIBSHORT2= libluajit-$(ABIVER).$(MAJVER).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_PCNAME= luajit.pc
|
||||||
|
|
||||||
INSTALL_STATIC= $(INSTALL_LIB)/$(INSTALL_ANAME)
|
INSTALL_STATIC= $(INSTALL_LIB)/$(INSTALL_ANAME)
|
||||||
@@ -77,7 +83,11 @@ INSTALL_F= install -m 0644
|
|||||||
UNINSTALL= $(RM)
|
UNINSTALL= $(RM)
|
||||||
LDCONFIG= ldconfig -n 2>/dev/null
|
LDCONFIG= ldconfig -n 2>/dev/null
|
||||||
SED_PC= sed -e "s|^prefix=.*|prefix=$(PREFIX)|" \
|
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_T= luajit
|
||||||
FILE_A= libluajit.a
|
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 \
|
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_x86.lua dis_x64.lua dis_arm.lua dis_arm64.lua \
|
||||||
dis_arm64be.lua dis_ppc.lua dis_mips.lua dis_mipsel.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)))
|
ifeq (,$(findstring Windows,$(OS)))
|
||||||
HOST_SYS:= $(shell uname -s)
|
HOST_SYS:= $(shell uname -s)
|
||||||
@@ -109,9 +121,9 @@ endif
|
|||||||
INSTALL_DEP= src/luajit
|
INSTALL_DEP= src/luajit
|
||||||
|
|
||||||
default all $(INSTALL_DEP):
|
default all $(INSTALL_DEP):
|
||||||
@echo "==== Building LuaJIT $(VERSION) ===="
|
@echo "==== Building LuaJIT $(MMVERSION) ===="
|
||||||
$(MAKE) -C src
|
$(MAKE) -C src
|
||||||
@echo "==== Successfully built LuaJIT $(VERSION) ===="
|
@echo "==== Successfully built LuaJIT $(MMVERSION) ===="
|
||||||
|
|
||||||
install: $(INSTALL_DEP)
|
install: $(INSTALL_DEP)
|
||||||
@echo "==== Installing LuaJIT $(VERSION) to $(PREFIX) ===="
|
@echo "==== Installing LuaJIT $(VERSION) to $(PREFIX) ===="
|
||||||
@@ -130,18 +142,12 @@ install: $(INSTALL_DEP)
|
|||||||
$(RM) $(FILE_PC).tmp
|
$(RM) $(FILE_PC).tmp
|
||||||
cd src && $(INSTALL_F) $(FILES_INC) $(INSTALL_INC)
|
cd src && $(INSTALL_F) $(FILES_INC) $(INSTALL_INC)
|
||||||
cd src/jit && $(INSTALL_F) $(FILES_JITLIB) $(INSTALL_JITLIB)
|
cd src/jit && $(INSTALL_F) $(FILES_JITLIB) $(INSTALL_JITLIB)
|
||||||
|
$(SYMLINK) $(INSTALL_TNAME) $(INSTALL_TSYM)
|
||||||
@echo "==== Successfully installed LuaJIT $(VERSION) to $(PREFIX) ===="
|
@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:
|
uninstall:
|
||||||
@echo "==== Uninstalling LuaJIT $(VERSION) from $(PREFIX) ===="
|
@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 \
|
for file in $(FILES_JITLIB); do \
|
||||||
$(UNINSTALL) $(INSTALL_JITLIB)/$$file; \
|
$(UNINSTALL) $(INSTALL_JITLIB)/$$file; \
|
||||||
done
|
done
|
||||||
@@ -155,8 +161,9 @@ uninstall:
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
amalg:
|
amalg:
|
||||||
@echo "Building LuaJIT $(VERSION)"
|
@echo "==== Building LuaJIT $(MMVERSION) (amalgamation) ===="
|
||||||
$(MAKE) -C src amalg
|
$(MAKE) -C src amalg
|
||||||
|
@echo "==== Successfully built LuaJIT $(MMVERSION) (amalgamation) ===="
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(MAKE) -C src 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.
|
LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language.
|
||||||
|
|
||||||
Project Homepage: https://luajit.org/
|
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.
|
LuaJIT is free software, released under the MIT license.
|
||||||
See full Copyright Notice in the COPYRIGHT file or in luajit.h.
|
See full Copyright Notice in the COPYRIGHT file or in luajit.h.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT bytecode listing module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -41,7 +41,6 @@
|
|||||||
|
|
||||||
-- Cache some library functions and objects.
|
-- Cache some library functions and objects.
|
||||||
local jit = require("jit")
|
local jit = require("jit")
|
||||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
|
||||||
local jutil = require("jit.util")
|
local jutil = require("jit.util")
|
||||||
local vmdef = require("jit.vmdef")
|
local vmdef = require("jit.vmdef")
|
||||||
local bit = require("bit")
|
local bit = require("bit")
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT module to save/list bytecode.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
local jit = require("jit")
|
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")
|
local bit = require("bit")
|
||||||
|
|
||||||
-- Symbol name prefix for LuaJIT bytecode.
|
-- 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).
|
-t type Set output file type (default: auto-detect from output name).
|
||||||
-a arch Override architecture for object files (default: native).
|
-a arch Override architecture for object files (default: native).
|
||||||
-o os Override OS 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.
|
-e chunk Use chunk string as input.
|
||||||
-- Stop handling options.
|
-- Stop handling options.
|
||||||
- Use stdin as input and/or stdout as output.
|
- 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)
|
os.exit(1)
|
||||||
end
|
end
|
||||||
@@ -49,10 +50,22 @@ local function check(ok, ...)
|
|||||||
os.exit(1)
|
os.exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function readfile(input)
|
local function readfile(ctx, input)
|
||||||
if type(input) == "function" then return input end
|
if type(input) == "function" then return input end
|
||||||
if input == "-" then input = nil end
|
if ctx.filename then
|
||||||
return check(loadfile(input))
|
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
|
end
|
||||||
|
|
||||||
local function savefile(name, mode)
|
local function savefile(name, mode)
|
||||||
@@ -68,7 +81,7 @@ end
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
local map_type = {
|
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 = {
|
local map_arch = {
|
||||||
@@ -456,18 +469,18 @@ typedef struct {
|
|||||||
uint32_t value;
|
uint32_t value;
|
||||||
} mach_nlist;
|
} mach_nlist;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t strx;
|
int32_t strx;
|
||||||
uint8_t type, sect;
|
uint8_t type, sect;
|
||||||
uint16_t desc;
|
uint16_t desc;
|
||||||
uint64_t value;
|
uint64_t value;
|
||||||
} mach_nlist_64;
|
} mach_nlist_64;
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t magic, nfat_arch;
|
int32_t magic, nfat_arch;
|
||||||
} mach_fat_header;
|
} mach_fat_header;
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t cputype, cpusubtype, offset, size, align;
|
int32_t cputype, cpusubtype, offset, size, align;
|
||||||
} mach_fat_arch;
|
} mach_fat_arch;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct {
|
struct {
|
||||||
@@ -501,6 +514,18 @@ typedef struct {
|
|||||||
mach_nlist sym_entry;
|
mach_nlist sym_entry;
|
||||||
uint8_t space[4096];
|
uint8_t space[4096];
|
||||||
} mach_fat_obj;
|
} 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 symname = '_'..LJBC_PREFIX..ctx.modname
|
||||||
local isfat, is64, align, mobj = false, false, 4, "mach_obj"
|
local isfat, is64, align, mobj = false, false, 4, "mach_obj"
|
||||||
@@ -509,7 +534,7 @@ typedef struct {
|
|||||||
elseif ctx.arch == "arm" then
|
elseif ctx.arch == "arm" then
|
||||||
isfat, mobj = true, "mach_fat_obj"
|
isfat, mobj = true, "mach_fat_obj"
|
||||||
elseif ctx.arch == "arm64" then
|
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
|
else
|
||||||
check(ctx.arch == "x86", "unsupported architecture for OSX")
|
check(ctx.arch == "x86", "unsupported architecture for OSX")
|
||||||
end
|
end
|
||||||
@@ -592,13 +617,13 @@ end
|
|||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
local function bclist(input, output)
|
local function bclist(ctx, input, output)
|
||||||
local f = readfile(input)
|
local f = readfile(ctx, input)
|
||||||
require("jit.bc").dump(f, savefile(output, "w"), true)
|
require("jit.bc").dump(f, savefile(output, "w"), true)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function bcsave(ctx, input, output)
|
local function bcsave(ctx, input, output)
|
||||||
local f = readfile(input)
|
local f = readfile(ctx, input)
|
||||||
local s = string.dump(f, ctx.strip)
|
local s = string.dump(f, ctx.strip)
|
||||||
local t = ctx.type
|
local t = ctx.type
|
||||||
if not t then
|
if not t then
|
||||||
@@ -651,6 +676,8 @@ local function docmd(...)
|
|||||||
ctx.arch = checkarg(tremove(arg, n), map_arch, "architecture")
|
ctx.arch = checkarg(tremove(arg, n), map_arch, "architecture")
|
||||||
elseif opt == "o" then
|
elseif opt == "o" then
|
||||||
ctx.os = checkarg(tremove(arg, n), map_os, "OS name")
|
ctx.os = checkarg(tremove(arg, n), map_os, "OS name")
|
||||||
|
elseif opt == "F" then
|
||||||
|
ctx.filename = "@"..tremove(arg, n)
|
||||||
else
|
else
|
||||||
usage()
|
usage()
|
||||||
end
|
end
|
||||||
@@ -662,7 +689,7 @@ local function docmd(...)
|
|||||||
end
|
end
|
||||||
if list then
|
if list then
|
||||||
if #arg == 0 or #arg > 2 then usage() end
|
if #arg == 0 or #arg > 2 then usage() end
|
||||||
bclist(arg[1], arg[2] or "-")
|
bclist(ctx, arg[1], arg[2] or "-")
|
||||||
else
|
else
|
||||||
if #arg ~= 2 then usage() end
|
if #arg ~= 2 then usage() end
|
||||||
bcsave(ctx, arg[1], arg[2])
|
bcsave(ctx, arg[1], arg[2])
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT ARM disassembler module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT ARM64 disassembler module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
--
|
--
|
||||||
-- Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com.
|
-- Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com.
|
||||||
@@ -107,24 +107,20 @@ local map_logsr = { -- Logical, shifted register.
|
|||||||
[0] = {
|
[0] = {
|
||||||
shift = 29, mask = 3,
|
shift = 29, mask = 3,
|
||||||
[0] = {
|
[0] = {
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg",
|
[0] = "andDNMSg", "bicDNMSg"
|
||||||
"andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] ="orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg",
|
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg"
|
||||||
"orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg",
|
[0] = "eorDNMSg", "eonDNMSg"
|
||||||
"eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg",
|
[0] = "ands|tstD0NMSg", "bicsDNMSg"
|
||||||
"ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
false -- unallocated
|
false -- unallocated
|
||||||
@@ -132,24 +128,20 @@ local map_logsr = { -- Logical, shifted register.
|
|||||||
{
|
{
|
||||||
shift = 29, mask = 3,
|
shift = 29, mask = 3,
|
||||||
[0] = {
|
[0] = {
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg",
|
[0] = "andDNMSg", "bicDNMSg"
|
||||||
"andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg",
|
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg"
|
||||||
"orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg",
|
[0] = "eorDNMSg", "eonDNMSg"
|
||||||
"eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg",
|
[0] = "ands|tstD0NMSg", "bicsDNMSg"
|
||||||
"ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -735,7 +727,7 @@ local map_cond = {
|
|||||||
"hi", "ls", "ge", "lt", "gt", "le", "al",
|
"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 = {
|
local map_extend = {
|
||||||
[0] = "uxtb", "uxth", "uxtw", "uxtx", "sxtb", "sxth", "sxtw", "sxtx",
|
[0] = "uxtb", "uxth", "uxtw", "uxtx", "sxtb", "sxth", "sxtw", "sxtx",
|
||||||
@@ -956,7 +948,7 @@ local function disass_ins(ctx)
|
|||||||
elseif p == "U" then
|
elseif p == "U" then
|
||||||
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
||||||
local sz = band(rshift(op, 30), 3)
|
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
|
if imm12 ~= 0 then
|
||||||
x = "["..rn..", #"..imm12.."]"
|
x = "["..rn..", #"..imm12.."]"
|
||||||
else
|
else
|
||||||
@@ -993,8 +985,7 @@ local function disass_ins(ctx)
|
|||||||
x = x.."]"
|
x = x.."]"
|
||||||
end
|
end
|
||||||
elseif p == "P" then
|
elseif p == "P" then
|
||||||
local opcv, sh = rshift(op, 26), 2
|
local sh = 2 + rshift(op, 31 - band(rshift(op, 26), 1))
|
||||||
if opcv >= 0x2a then sh = 4 elseif opcv >= 0x1b then sh = 3 end
|
|
||||||
local imm7 = lshift(arshift(lshift(op, 10), 25), sh)
|
local imm7 = lshift(arshift(lshift(op, 10), 25), sh)
|
||||||
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
||||||
local ind = band(rshift(op, 23), 3)
|
local ind = band(rshift(op, 23), 3)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT ARM64BE disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- ARM64 instructions are always little-endian. So just forward to the
|
-- ARM64 instructions are always little-endian. So just forward to the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS disassembler module.
|
-- 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
|
-- 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.
|
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS64 disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the big-endian functions from the
|
-- This module just exports the big-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS64EL disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the little-endian functions from the
|
-- This module just exports the little-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS64R6 disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the r6 big-endian functions from the
|
-- This module just exports the r6 big-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS64R6EL disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the r6 little-endian functions from the
|
-- This module just exports the r6 little-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPSEL disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the little-endian functions from the
|
-- This module just exports the little-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT PPC disassembler module.
|
-- 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
|
-- 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.
|
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT x64 disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the 64 bit functions from the combined
|
-- This module just exports the 64 bit functions from the combined
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT x86/x64 disassembler module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT compiler dump module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -55,7 +55,6 @@
|
|||||||
|
|
||||||
-- Cache some library functions and objects.
|
-- Cache some library functions and objects.
|
||||||
local jit = require("jit")
|
local jit = require("jit")
|
||||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
|
||||||
local jutil = require("jit.util")
|
local jutil = require("jit.util")
|
||||||
local vmdef = require("jit.vmdef")
|
local vmdef = require("jit.vmdef")
|
||||||
local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc
|
local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT profiler.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -41,7 +41,6 @@
|
|||||||
|
|
||||||
-- Cache some library functions and objects.
|
-- Cache some library functions and objects.
|
||||||
local jit = require("jit")
|
local jit = require("jit")
|
||||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
|
||||||
local profile = require("jit.profile")
|
local profile = require("jit.profile")
|
||||||
local vmdef = require("jit.vmdef")
|
local vmdef = require("jit.vmdef")
|
||||||
local math = math
|
local math = math
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- Verbose mode of the LuaJIT compiler.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -59,7 +59,6 @@
|
|||||||
|
|
||||||
-- Cache some library functions and objects.
|
-- Cache some library functions and objects.
|
||||||
local jit = require("jit")
|
local jit = require("jit")
|
||||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
|
||||||
local jutil = require("jit.util")
|
local jutil = require("jit.util")
|
||||||
local vmdef = require("jit.vmdef")
|
local vmdef = require("jit.vmdef")
|
||||||
local funcinfo, traceinfo = jutil.funcinfo, jutil.traceinfo
|
local funcinfo, traceinfo = jutil.funcinfo, jutil.traceinfo
|
||||||
|
|||||||
@@ -1,395 +1,396 @@
|
|||||||
-- This is a generated file. DO NOT EDIT!
|
-- This is a generated file. DO NOT EDIT!
|
||||||
|
|
||||||
return {
|
assert(require("jit").version == "LuaJIT 2.1.1700008891", "LuaJIT core/library version mismatch")
|
||||||
|
|
||||||
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",
|
return {
|
||||||
|
|
||||||
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 ",
|
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",
|
||||||
|
|
||||||
irfpm = { [0]="floor", "ceil", "trunc", "sqrt", "log", "log2", "other", },
|
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 ",
|
||||||
|
|
||||||
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", },
|
irfpm = { [0]="floor", "ceil", "trunc", "sqrt", "log", "log2", "other", },
|
||||||
|
|
||||||
ircall = {
|
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", },
|
||||||
[0]="lj_str_cmp",
|
|
||||||
"lj_str_find",
|
ircall = {
|
||||||
"lj_str_new",
|
[0]="lj_str_cmp",
|
||||||
"lj_strscan_num",
|
"lj_str_find",
|
||||||
"lj_strfmt_int",
|
"lj_str_new",
|
||||||
"lj_strfmt_num",
|
"lj_strscan_num",
|
||||||
"lj_strfmt_char",
|
"lj_strfmt_int",
|
||||||
"lj_strfmt_putint",
|
"lj_strfmt_num",
|
||||||
"lj_strfmt_putnum",
|
"lj_strfmt_char",
|
||||||
"lj_strfmt_putquoted",
|
"lj_strfmt_putint",
|
||||||
"lj_strfmt_putfxint",
|
"lj_strfmt_putnum",
|
||||||
"lj_strfmt_putfnum_int",
|
"lj_strfmt_putquoted",
|
||||||
"lj_strfmt_putfnum_uint",
|
"lj_strfmt_putfxint",
|
||||||
"lj_strfmt_putfnum",
|
"lj_strfmt_putfnum_int",
|
||||||
"lj_strfmt_putfstr",
|
"lj_strfmt_putfnum_uint",
|
||||||
"lj_strfmt_putfchar",
|
"lj_strfmt_putfnum",
|
||||||
"lj_buf_putmem",
|
"lj_strfmt_putfstr",
|
||||||
"lj_buf_putstr",
|
"lj_strfmt_putfchar",
|
||||||
"lj_buf_putchar",
|
"lj_buf_putmem",
|
||||||
"lj_buf_putstr_reverse",
|
"lj_buf_putstr",
|
||||||
"lj_buf_putstr_lower",
|
"lj_buf_putchar",
|
||||||
"lj_buf_putstr_upper",
|
"lj_buf_putstr_reverse",
|
||||||
"lj_buf_putstr_rep",
|
"lj_buf_putstr_lower",
|
||||||
"lj_buf_puttab",
|
"lj_buf_putstr_upper",
|
||||||
"lj_bufx_set",
|
"lj_buf_putstr_rep",
|
||||||
"lj_bufx_more",
|
"lj_buf_puttab",
|
||||||
"lj_serialize_put",
|
"lj_bufx_set",
|
||||||
"lj_serialize_get",
|
"lj_bufx_more",
|
||||||
"lj_serialize_encode",
|
"lj_serialize_put",
|
||||||
"lj_serialize_decode",
|
"lj_serialize_get",
|
||||||
"lj_buf_tostr",
|
"lj_serialize_encode",
|
||||||
"lj_tab_new_ah",
|
"lj_serialize_decode",
|
||||||
"lj_tab_new1",
|
"lj_buf_tostr",
|
||||||
"lj_tab_dup",
|
"lj_tab_new_ah",
|
||||||
"lj_tab_clear",
|
"lj_tab_new1",
|
||||||
"lj_tab_newkey",
|
"lj_tab_dup",
|
||||||
"lj_tab_keyindex",
|
"lj_tab_clear",
|
||||||
"lj_vm_next",
|
"lj_tab_newkey",
|
||||||
"lj_tab_len",
|
"lj_tab_keyindex",
|
||||||
"lj_tab_len_hint",
|
"lj_vm_next",
|
||||||
"lj_gc_step_jit",
|
"lj_tab_len",
|
||||||
"lj_gc_barrieruv",
|
"lj_tab_len_hint",
|
||||||
"lj_mem_newgco",
|
"lj_gc_step_jit",
|
||||||
"lj_prng_u64d",
|
"lj_gc_barrieruv",
|
||||||
"lj_vm_modi",
|
"lj_mem_newgco",
|
||||||
"log10",
|
"lj_prng_u64d",
|
||||||
"exp",
|
"lj_vm_modi",
|
||||||
"sin",
|
"log10",
|
||||||
"cos",
|
"exp",
|
||||||
"tan",
|
"sin",
|
||||||
"asin",
|
"cos",
|
||||||
"acos",
|
"tan",
|
||||||
"atan",
|
"asin",
|
||||||
"sinh",
|
"acos",
|
||||||
"cosh",
|
"atan",
|
||||||
"tanh",
|
"sinh",
|
||||||
"fputc",
|
"cosh",
|
||||||
"fwrite",
|
"tanh",
|
||||||
"fflush",
|
"fputc",
|
||||||
"lj_vm_floor",
|
"fwrite",
|
||||||
"lj_vm_ceil",
|
"fflush",
|
||||||
"lj_vm_trunc",
|
"lj_vm_floor",
|
||||||
"sqrt",
|
"lj_vm_ceil",
|
||||||
"log",
|
"lj_vm_trunc",
|
||||||
"lj_vm_log2",
|
"sqrt",
|
||||||
"lj_vm_powi",
|
"log",
|
||||||
"pow",
|
"lj_vm_log2",
|
||||||
"atan2",
|
"pow",
|
||||||
"ldexp",
|
"atan2",
|
||||||
"lj_vm_tobit",
|
"ldexp",
|
||||||
"softfp_add",
|
"lj_vm_tobit",
|
||||||
"softfp_sub",
|
"softfp_add",
|
||||||
"softfp_mul",
|
"softfp_sub",
|
||||||
"softfp_div",
|
"softfp_mul",
|
||||||
"softfp_cmp",
|
"softfp_div",
|
||||||
"softfp_i2d",
|
"softfp_cmp",
|
||||||
"softfp_d2i",
|
"softfp_i2d",
|
||||||
"lj_vm_sfmin",
|
"softfp_d2i",
|
||||||
"lj_vm_sfmax",
|
"lj_vm_sfmin",
|
||||||
"lj_vm_tointg",
|
"lj_vm_sfmax",
|
||||||
"softfp_ui2d",
|
"lj_vm_tointg",
|
||||||
"softfp_f2d",
|
"softfp_ui2d",
|
||||||
"softfp_d2ui",
|
"softfp_f2d",
|
||||||
"softfp_d2f",
|
"softfp_d2ui",
|
||||||
"softfp_i2f",
|
"softfp_d2f",
|
||||||
"softfp_ui2f",
|
"softfp_i2f",
|
||||||
"softfp_f2i",
|
"softfp_ui2f",
|
||||||
"softfp_f2ui",
|
"softfp_f2i",
|
||||||
"fp64_l2d",
|
"softfp_f2ui",
|
||||||
"fp64_ul2d",
|
"fp64_l2d",
|
||||||
"fp64_l2f",
|
"fp64_ul2d",
|
||||||
"fp64_ul2f",
|
"fp64_l2f",
|
||||||
"fp64_d2l",
|
"fp64_ul2f",
|
||||||
"fp64_d2ul",
|
"fp64_d2l",
|
||||||
"fp64_f2l",
|
"fp64_d2ul",
|
||||||
"fp64_f2ul",
|
"fp64_f2l",
|
||||||
"lj_carith_divi64",
|
"fp64_f2ul",
|
||||||
"lj_carith_divu64",
|
"lj_carith_divi64",
|
||||||
"lj_carith_modi64",
|
"lj_carith_divu64",
|
||||||
"lj_carith_modu64",
|
"lj_carith_modi64",
|
||||||
"lj_carith_powi64",
|
"lj_carith_modu64",
|
||||||
"lj_carith_powu64",
|
"lj_carith_powi64",
|
||||||
"lj_cdata_newv",
|
"lj_carith_powu64",
|
||||||
"lj_cdata_setfin",
|
"lj_cdata_newv",
|
||||||
"strlen",
|
"lj_cdata_setfin",
|
||||||
"memcpy",
|
"strlen",
|
||||||
"memset",
|
"memcpy",
|
||||||
"lj_vm_errno",
|
"memset",
|
||||||
"lj_carith_mul64",
|
"lj_vm_errno",
|
||||||
"lj_carith_shl64",
|
"lj_carith_mul64",
|
||||||
"lj_carith_shr64",
|
"lj_carith_shl64",
|
||||||
"lj_carith_sar64",
|
"lj_carith_shr64",
|
||||||
"lj_carith_rol64",
|
"lj_carith_sar64",
|
||||||
"lj_carith_ror64",
|
"lj_carith_rol64",
|
||||||
},
|
"lj_carith_ror64",
|
||||||
|
},
|
||||||
traceerr = {
|
|
||||||
[0]="error thrown or hook called during recording",
|
traceerr = {
|
||||||
"trace too short",
|
[0]="error thrown or hook called during recording",
|
||||||
"trace too long",
|
"trace too short",
|
||||||
"trace too deep",
|
"trace too long",
|
||||||
"too many snapshots",
|
"trace too deep",
|
||||||
"blacklisted",
|
"too many snapshots",
|
||||||
"retry recording",
|
"blacklisted",
|
||||||
"NYI: bytecode %d",
|
"retry recording",
|
||||||
"leaving loop in root trace",
|
"NYI: bytecode %d",
|
||||||
"inner loop in root trace",
|
"leaving loop in root trace",
|
||||||
"loop unroll limit reached",
|
"inner loop in root trace",
|
||||||
"bad argument type",
|
"loop unroll limit reached",
|
||||||
"JIT compilation disabled for function",
|
"bad argument type",
|
||||||
"call unroll limit reached",
|
"JIT compilation disabled for function",
|
||||||
"down-recursion, restarting",
|
"call unroll limit reached",
|
||||||
"NYI: unsupported variant of FastFunc %s",
|
"down-recursion, restarting",
|
||||||
"NYI: return to lower frame",
|
"NYI: unsupported variant of FastFunc %s",
|
||||||
"store with nil or NaN key",
|
"NYI: return to lower frame",
|
||||||
"missing metamethod",
|
"store with nil or NaN key",
|
||||||
"looping index lookup",
|
"missing metamethod",
|
||||||
"NYI: mixed sparse/dense table",
|
"looping index lookup",
|
||||||
"symbol not in cache",
|
"NYI: mixed sparse/dense table",
|
||||||
"NYI: unsupported C type conversion",
|
"symbol not in cache",
|
||||||
"NYI: unsupported C function type",
|
"NYI: unsupported C type conversion",
|
||||||
"guard would always fail",
|
"NYI: unsupported C function type",
|
||||||
"too many PHIs",
|
"guard would always fail",
|
||||||
"persistent type instability",
|
"too many PHIs",
|
||||||
"failed to allocate mcode memory",
|
"persistent type instability",
|
||||||
"machine code too long",
|
"failed to allocate mcode memory",
|
||||||
"hit mcode limit (retrying)",
|
"machine code too long",
|
||||||
"too many spill slots",
|
"hit mcode limit (retrying)",
|
||||||
"inconsistent register allocation",
|
"too many spill slots",
|
||||||
"NYI: cannot assemble IR instruction %d",
|
"inconsistent register allocation",
|
||||||
"NYI: PHI shuffling too complex",
|
"NYI: cannot assemble IR instruction %d",
|
||||||
"NYI: register coalescing too complex",
|
"NYI: PHI shuffling too complex",
|
||||||
},
|
"NYI: register coalescing too complex",
|
||||||
|
},
|
||||||
ffnames = {
|
|
||||||
[0]="Lua",
|
ffnames = {
|
||||||
"C",
|
[0]="Lua",
|
||||||
"assert",
|
"C",
|
||||||
"type",
|
"assert",
|
||||||
"next",
|
"type",
|
||||||
"pairs",
|
"next",
|
||||||
"ipairs_aux",
|
"pairs",
|
||||||
"ipairs",
|
"ipairs_aux",
|
||||||
"getmetatable",
|
"ipairs",
|
||||||
"setmetatable",
|
"getmetatable",
|
||||||
"getfenv",
|
"setmetatable",
|
||||||
"setfenv",
|
"getfenv",
|
||||||
"rawget",
|
"setfenv",
|
||||||
"rawset",
|
"rawget",
|
||||||
"rawequal",
|
"rawset",
|
||||||
"unpack",
|
"rawequal",
|
||||||
"select",
|
"unpack",
|
||||||
"tonumber",
|
"select",
|
||||||
"tostring",
|
"tonumber",
|
||||||
"error",
|
"tostring",
|
||||||
"pcall",
|
"error",
|
||||||
"xpcall",
|
"pcall",
|
||||||
"loadfile",
|
"xpcall",
|
||||||
"load",
|
"loadfile",
|
||||||
"loadstring",
|
"load",
|
||||||
"dofile",
|
"loadstring",
|
||||||
"gcinfo",
|
"dofile",
|
||||||
"collectgarbage",
|
"gcinfo",
|
||||||
"newproxy",
|
"collectgarbage",
|
||||||
"print",
|
"newproxy",
|
||||||
"coroutine.status",
|
"print",
|
||||||
"coroutine.running",
|
"coroutine.status",
|
||||||
"coroutine.isyieldable",
|
"coroutine.running",
|
||||||
"coroutine.create",
|
"coroutine.isyieldable",
|
||||||
"coroutine.yield",
|
"coroutine.create",
|
||||||
"coroutine.resume",
|
"coroutine.yield",
|
||||||
"coroutine.wrap_aux",
|
"coroutine.resume",
|
||||||
"coroutine.wrap",
|
"coroutine.wrap_aux",
|
||||||
"math.abs",
|
"coroutine.wrap",
|
||||||
"math.floor",
|
"math.abs",
|
||||||
"math.ceil",
|
"math.floor",
|
||||||
"math.sqrt",
|
"math.ceil",
|
||||||
"math.log10",
|
"math.sqrt",
|
||||||
"math.exp",
|
"math.log10",
|
||||||
"math.sin",
|
"math.exp",
|
||||||
"math.cos",
|
"math.sin",
|
||||||
"math.tan",
|
"math.cos",
|
||||||
"math.asin",
|
"math.tan",
|
||||||
"math.acos",
|
"math.asin",
|
||||||
"math.atan",
|
"math.acos",
|
||||||
"math.sinh",
|
"math.atan",
|
||||||
"math.cosh",
|
"math.sinh",
|
||||||
"math.tanh",
|
"math.cosh",
|
||||||
"math.frexp",
|
"math.tanh",
|
||||||
"math.modf",
|
"math.frexp",
|
||||||
"math.log",
|
"math.modf",
|
||||||
"math.atan2",
|
"math.log",
|
||||||
"math.pow",
|
"math.atan2",
|
||||||
"math.fmod",
|
"math.pow",
|
||||||
"math.ldexp",
|
"math.fmod",
|
||||||
"math.min",
|
"math.ldexp",
|
||||||
"math.max",
|
"math.min",
|
||||||
"math.random",
|
"math.max",
|
||||||
"math.randomseed",
|
"math.random",
|
||||||
"bit.tobit",
|
"math.randomseed",
|
||||||
"bit.bnot",
|
"bit.tobit",
|
||||||
"bit.bswap",
|
"bit.bnot",
|
||||||
"bit.lshift",
|
"bit.bswap",
|
||||||
"bit.rshift",
|
"bit.lshift",
|
||||||
"bit.arshift",
|
"bit.rshift",
|
||||||
"bit.rol",
|
"bit.arshift",
|
||||||
"bit.ror",
|
"bit.rol",
|
||||||
"bit.band",
|
"bit.ror",
|
||||||
"bit.bor",
|
"bit.band",
|
||||||
"bit.bxor",
|
"bit.bor",
|
||||||
"bit.tohex",
|
"bit.bxor",
|
||||||
"string.byte",
|
"bit.tohex",
|
||||||
"string.char",
|
"string.byte",
|
||||||
"string.sub",
|
"string.char",
|
||||||
"string.rep",
|
"string.sub",
|
||||||
"string.reverse",
|
"string.rep",
|
||||||
"string.lower",
|
"string.reverse",
|
||||||
"string.upper",
|
"string.lower",
|
||||||
"string.dump",
|
"string.upper",
|
||||||
"string.find",
|
"string.dump",
|
||||||
"string.match",
|
"string.find",
|
||||||
"string.gmatch_aux",
|
"string.match",
|
||||||
"string.gmatch",
|
"string.gmatch_aux",
|
||||||
"string.gsub",
|
"string.gmatch",
|
||||||
"string.format",
|
"string.gsub",
|
||||||
"table.maxn",
|
"string.format",
|
||||||
"table.insert",
|
"table.maxn",
|
||||||
"table.concat",
|
"table.insert",
|
||||||
"table.sort",
|
"table.concat",
|
||||||
"table.new",
|
"table.sort",
|
||||||
"table.clear",
|
"table.new",
|
||||||
"io.method.close",
|
"table.clear",
|
||||||
"io.method.read",
|
"io.method.close",
|
||||||
"io.method.write",
|
"io.method.read",
|
||||||
"io.method.flush",
|
"io.method.write",
|
||||||
"io.method.seek",
|
"io.method.flush",
|
||||||
"io.method.setvbuf",
|
"io.method.seek",
|
||||||
"io.method.lines",
|
"io.method.setvbuf",
|
||||||
"io.method.__gc",
|
"io.method.lines",
|
||||||
"io.method.__tostring",
|
"io.method.__gc",
|
||||||
"io.open",
|
"io.method.__tostring",
|
||||||
"io.popen",
|
"io.open",
|
||||||
"io.tmpfile",
|
"io.popen",
|
||||||
"io.close",
|
"io.tmpfile",
|
||||||
"io.read",
|
"io.close",
|
||||||
"io.write",
|
"io.read",
|
||||||
"io.flush",
|
"io.write",
|
||||||
"io.input",
|
"io.flush",
|
||||||
"io.output",
|
"io.input",
|
||||||
"io.lines",
|
"io.output",
|
||||||
"io.type",
|
"io.lines",
|
||||||
"os.execute",
|
"io.type",
|
||||||
"os.remove",
|
"os.execute",
|
||||||
"os.rename",
|
"os.remove",
|
||||||
"os.tmpname",
|
"os.rename",
|
||||||
"os.getenv",
|
"os.tmpname",
|
||||||
"os.exit",
|
"os.getenv",
|
||||||
"os.clock",
|
"os.exit",
|
||||||
"os.date",
|
"os.clock",
|
||||||
"os.time",
|
"os.date",
|
||||||
"os.difftime",
|
"os.time",
|
||||||
"os.setlocale",
|
"os.difftime",
|
||||||
"debug.getregistry",
|
"os.setlocale",
|
||||||
"debug.getmetatable",
|
"debug.getregistry",
|
||||||
"debug.setmetatable",
|
"debug.getmetatable",
|
||||||
"debug.getfenv",
|
"debug.setmetatable",
|
||||||
"debug.setfenv",
|
"debug.getfenv",
|
||||||
"debug.getinfo",
|
"debug.setfenv",
|
||||||
"debug.getlocal",
|
"debug.getinfo",
|
||||||
"debug.setlocal",
|
"debug.getlocal",
|
||||||
"debug.getupvalue",
|
"debug.setlocal",
|
||||||
"debug.setupvalue",
|
"debug.getupvalue",
|
||||||
"debug.upvalueid",
|
"debug.setupvalue",
|
||||||
"debug.upvaluejoin",
|
"debug.upvalueid",
|
||||||
"debug.sethook",
|
"debug.upvaluejoin",
|
||||||
"debug.gethook",
|
"debug.sethook",
|
||||||
"debug.debug",
|
"debug.gethook",
|
||||||
"debug.traceback",
|
"debug.debug",
|
||||||
"jit.on",
|
"debug.traceback",
|
||||||
"jit.off",
|
"jit.on",
|
||||||
"jit.flush",
|
"jit.off",
|
||||||
"jit.status",
|
"jit.flush",
|
||||||
"jit.security",
|
"jit.status",
|
||||||
"jit.attach",
|
"jit.security",
|
||||||
"jit.util.funcinfo",
|
"jit.attach",
|
||||||
"jit.util.funcbc",
|
"jit.util.funcinfo",
|
||||||
"jit.util.funck",
|
"jit.util.funcbc",
|
||||||
"jit.util.funcuvname",
|
"jit.util.funck",
|
||||||
"jit.util.traceinfo",
|
"jit.util.funcuvname",
|
||||||
"jit.util.traceir",
|
"jit.util.traceinfo",
|
||||||
"jit.util.tracek",
|
"jit.util.traceir",
|
||||||
"jit.util.tracesnap",
|
"jit.util.tracek",
|
||||||
"jit.util.tracemc",
|
"jit.util.tracesnap",
|
||||||
"jit.util.traceexitstub",
|
"jit.util.tracemc",
|
||||||
"jit.util.ircalladdr",
|
"jit.util.traceexitstub",
|
||||||
"jit.opt.start",
|
"jit.util.ircalladdr",
|
||||||
"jit.profile.start",
|
"jit.opt.start",
|
||||||
"jit.profile.stop",
|
"jit.profile.start",
|
||||||
"jit.profile.dumpstack",
|
"jit.profile.stop",
|
||||||
"ffi.meta.__index",
|
"jit.profile.dumpstack",
|
||||||
"ffi.meta.__newindex",
|
"ffi.meta.__index",
|
||||||
"ffi.meta.__eq",
|
"ffi.meta.__newindex",
|
||||||
"ffi.meta.__len",
|
"ffi.meta.__eq",
|
||||||
"ffi.meta.__lt",
|
"ffi.meta.__len",
|
||||||
"ffi.meta.__le",
|
"ffi.meta.__lt",
|
||||||
"ffi.meta.__concat",
|
"ffi.meta.__le",
|
||||||
"ffi.meta.__call",
|
"ffi.meta.__concat",
|
||||||
"ffi.meta.__add",
|
"ffi.meta.__call",
|
||||||
"ffi.meta.__sub",
|
"ffi.meta.__add",
|
||||||
"ffi.meta.__mul",
|
"ffi.meta.__sub",
|
||||||
"ffi.meta.__div",
|
"ffi.meta.__mul",
|
||||||
"ffi.meta.__mod",
|
"ffi.meta.__div",
|
||||||
"ffi.meta.__pow",
|
"ffi.meta.__mod",
|
||||||
"ffi.meta.__unm",
|
"ffi.meta.__pow",
|
||||||
"ffi.meta.__tostring",
|
"ffi.meta.__unm",
|
||||||
"ffi.meta.__pairs",
|
"ffi.meta.__tostring",
|
||||||
"ffi.meta.__ipairs",
|
"ffi.meta.__pairs",
|
||||||
"ffi.clib.__index",
|
"ffi.meta.__ipairs",
|
||||||
"ffi.clib.__newindex",
|
"ffi.clib.__index",
|
||||||
"ffi.clib.__gc",
|
"ffi.clib.__newindex",
|
||||||
"ffi.callback.free",
|
"ffi.clib.__gc",
|
||||||
"ffi.callback.set",
|
"ffi.callback.free",
|
||||||
"ffi.cdef",
|
"ffi.callback.set",
|
||||||
"ffi.new",
|
"ffi.cdef",
|
||||||
"ffi.cast",
|
"ffi.new",
|
||||||
"ffi.typeof",
|
"ffi.cast",
|
||||||
"ffi.typeinfo",
|
"ffi.typeof",
|
||||||
"ffi.istype",
|
"ffi.typeinfo",
|
||||||
"ffi.sizeof",
|
"ffi.istype",
|
||||||
"ffi.alignof",
|
"ffi.sizeof",
|
||||||
"ffi.offsetof",
|
"ffi.alignof",
|
||||||
"ffi.errno",
|
"ffi.offsetof",
|
||||||
"ffi.string",
|
"ffi.errno",
|
||||||
"ffi.copy",
|
"ffi.string",
|
||||||
"ffi.fill",
|
"ffi.copy",
|
||||||
"ffi.abi",
|
"ffi.fill",
|
||||||
"ffi.metatype",
|
"ffi.abi",
|
||||||
"ffi.gc",
|
"ffi.metatype",
|
||||||
"ffi.load",
|
"ffi.gc",
|
||||||
"buffer.method.free",
|
"ffi.load",
|
||||||
"buffer.method.reset",
|
"buffer.method.free",
|
||||||
"buffer.method.skip",
|
"buffer.method.reset",
|
||||||
"buffer.method.set",
|
"buffer.method.skip",
|
||||||
"buffer.method.put",
|
"buffer.method.set",
|
||||||
"buffer.method.putf",
|
"buffer.method.put",
|
||||||
"buffer.method.get",
|
"buffer.method.putf",
|
||||||
"buffer.method.putcdata",
|
"buffer.method.get",
|
||||||
"buffer.method.reserve",
|
"buffer.method.putcdata",
|
||||||
"buffer.method.commit",
|
"buffer.method.reserve",
|
||||||
"buffer.method.ref",
|
"buffer.method.commit",
|
||||||
"buffer.method.encode",
|
"buffer.method.ref",
|
||||||
"buffer.method.decode",
|
"buffer.method.encode",
|
||||||
"buffer.method.__gc",
|
"buffer.method.decode",
|
||||||
"buffer.method.__tostring",
|
"buffer.method.__gc",
|
||||||
"buffer.method.__len",
|
"buffer.method.__tostring",
|
||||||
"buffer.new",
|
"buffer.method.__len",
|
||||||
"buffer.encode",
|
"buffer.new",
|
||||||
"buffer.decode",
|
"buffer.encode",
|
||||||
},
|
"buffer.decode",
|
||||||
|
},
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT profiler zones.
|
-- 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
|
-- 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/
|
** 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
|
** Permission is hereby granted, free of charge, to any person obtaining
|
||||||
** a copy of this software and associated documentation files (the
|
** a copy of this software and associated documentation files (the
|
||||||
@@ -30,10 +30,10 @@
|
|||||||
|
|
||||||
#include "lua.h"
|
#include "lua.h"
|
||||||
|
|
||||||
#define LUAJIT_VERSION "LuaJIT 2.1.0-beta3"
|
#define LUAJIT_VERSION "LuaJIT 2.1.1700008891"
|
||||||
#define LUAJIT_VERSION_NUM 20100 /* Version 2.1.0 = 02.01.00. */
|
#define LUAJIT_VERSION_NUM 20199 /* Deprecated. */
|
||||||
#define LUAJIT_VERSION_SYM luaJIT_version_2_1_0_beta3
|
#define LUAJIT_VERSION_SYM luaJIT_version_2_1_1700008891
|
||||||
#define LUAJIT_COPYRIGHT "Copyright (C) 2005-2021 Mike Pall"
|
#define LUAJIT_COPYRIGHT "Copyright (C) 2005-2023 Mike Pall"
|
||||||
#define LUAJIT_URL "https://luajit.org/"
|
#define LUAJIT_URL "https://luajit.org/"
|
||||||
|
|
||||||
/* Modes for luaJIT_setmode. */
|
/* Modes for luaJIT_setmode. */
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT bytecode listing module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -41,7 +41,6 @@
|
|||||||
|
|
||||||
-- Cache some library functions and objects.
|
-- Cache some library functions and objects.
|
||||||
local jit = require("jit")
|
local jit = require("jit")
|
||||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
|
||||||
local jutil = require("jit.util")
|
local jutil = require("jit.util")
|
||||||
local vmdef = require("jit.vmdef")
|
local vmdef = require("jit.vmdef")
|
||||||
local bit = require("bit")
|
local bit = require("bit")
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT module to save/list bytecode.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
local jit = require("jit")
|
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")
|
local bit = require("bit")
|
||||||
|
|
||||||
-- Symbol name prefix for LuaJIT bytecode.
|
-- 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).
|
-t type Set output file type (default: auto-detect from output name).
|
||||||
-a arch Override architecture for object files (default: native).
|
-a arch Override architecture for object files (default: native).
|
||||||
-o os Override OS 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.
|
-e chunk Use chunk string as input.
|
||||||
-- Stop handling options.
|
-- Stop handling options.
|
||||||
- Use stdin as input and/or stdout as output.
|
- 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)
|
os.exit(1)
|
||||||
end
|
end
|
||||||
@@ -49,10 +50,22 @@ local function check(ok, ...)
|
|||||||
os.exit(1)
|
os.exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function readfile(input)
|
local function readfile(ctx, input)
|
||||||
if type(input) == "function" then return input end
|
if type(input) == "function" then return input end
|
||||||
if input == "-" then input = nil end
|
if ctx.filename then
|
||||||
return check(loadfile(input))
|
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
|
end
|
||||||
|
|
||||||
local function savefile(name, mode)
|
local function savefile(name, mode)
|
||||||
@@ -68,7 +81,7 @@ end
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
local map_type = {
|
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 = {
|
local map_arch = {
|
||||||
@@ -456,18 +469,18 @@ typedef struct {
|
|||||||
uint32_t value;
|
uint32_t value;
|
||||||
} mach_nlist;
|
} mach_nlist;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t strx;
|
int32_t strx;
|
||||||
uint8_t type, sect;
|
uint8_t type, sect;
|
||||||
uint16_t desc;
|
uint16_t desc;
|
||||||
uint64_t value;
|
uint64_t value;
|
||||||
} mach_nlist_64;
|
} mach_nlist_64;
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t magic, nfat_arch;
|
int32_t magic, nfat_arch;
|
||||||
} mach_fat_header;
|
} mach_fat_header;
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t cputype, cpusubtype, offset, size, align;
|
int32_t cputype, cpusubtype, offset, size, align;
|
||||||
} mach_fat_arch;
|
} mach_fat_arch;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct {
|
struct {
|
||||||
@@ -501,6 +514,18 @@ typedef struct {
|
|||||||
mach_nlist sym_entry;
|
mach_nlist sym_entry;
|
||||||
uint8_t space[4096];
|
uint8_t space[4096];
|
||||||
} mach_fat_obj;
|
} 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 symname = '_'..LJBC_PREFIX..ctx.modname
|
||||||
local isfat, is64, align, mobj = false, false, 4, "mach_obj"
|
local isfat, is64, align, mobj = false, false, 4, "mach_obj"
|
||||||
@@ -509,7 +534,7 @@ typedef struct {
|
|||||||
elseif ctx.arch == "arm" then
|
elseif ctx.arch == "arm" then
|
||||||
isfat, mobj = true, "mach_fat_obj"
|
isfat, mobj = true, "mach_fat_obj"
|
||||||
elseif ctx.arch == "arm64" then
|
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
|
else
|
||||||
check(ctx.arch == "x86", "unsupported architecture for OSX")
|
check(ctx.arch == "x86", "unsupported architecture for OSX")
|
||||||
end
|
end
|
||||||
@@ -592,13 +617,13 @@ end
|
|||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
local function bclist(input, output)
|
local function bclist(ctx, input, output)
|
||||||
local f = readfile(input)
|
local f = readfile(ctx, input)
|
||||||
require("jit.bc").dump(f, savefile(output, "w"), true)
|
require("jit.bc").dump(f, savefile(output, "w"), true)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function bcsave(ctx, input, output)
|
local function bcsave(ctx, input, output)
|
||||||
local f = readfile(input)
|
local f = readfile(ctx, input)
|
||||||
local s = string.dump(f, ctx.strip)
|
local s = string.dump(f, ctx.strip)
|
||||||
local t = ctx.type
|
local t = ctx.type
|
||||||
if not t then
|
if not t then
|
||||||
@@ -651,6 +676,8 @@ local function docmd(...)
|
|||||||
ctx.arch = checkarg(tremove(arg, n), map_arch, "architecture")
|
ctx.arch = checkarg(tremove(arg, n), map_arch, "architecture")
|
||||||
elseif opt == "o" then
|
elseif opt == "o" then
|
||||||
ctx.os = checkarg(tremove(arg, n), map_os, "OS name")
|
ctx.os = checkarg(tremove(arg, n), map_os, "OS name")
|
||||||
|
elseif opt == "F" then
|
||||||
|
ctx.filename = "@"..tremove(arg, n)
|
||||||
else
|
else
|
||||||
usage()
|
usage()
|
||||||
end
|
end
|
||||||
@@ -662,7 +689,7 @@ local function docmd(...)
|
|||||||
end
|
end
|
||||||
if list then
|
if list then
|
||||||
if #arg == 0 or #arg > 2 then usage() end
|
if #arg == 0 or #arg > 2 then usage() end
|
||||||
bclist(arg[1], arg[2] or "-")
|
bclist(ctx, arg[1], arg[2] or "-")
|
||||||
else
|
else
|
||||||
if #arg ~= 2 then usage() end
|
if #arg ~= 2 then usage() end
|
||||||
bcsave(ctx, arg[1], arg[2])
|
bcsave(ctx, arg[1], arg[2])
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT ARM disassembler module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT ARM64 disassembler module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
--
|
--
|
||||||
-- Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com.
|
-- Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com.
|
||||||
@@ -107,24 +107,20 @@ local map_logsr = { -- Logical, shifted register.
|
|||||||
[0] = {
|
[0] = {
|
||||||
shift = 29, mask = 3,
|
shift = 29, mask = 3,
|
||||||
[0] = {
|
[0] = {
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg",
|
[0] = "andDNMSg", "bicDNMSg"
|
||||||
"andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] ="orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg",
|
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg"
|
||||||
"orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg",
|
[0] = "eorDNMSg", "eonDNMSg"
|
||||||
"eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg",
|
[0] = "ands|tstD0NMSg", "bicsDNMSg"
|
||||||
"ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
false -- unallocated
|
false -- unallocated
|
||||||
@@ -132,24 +128,20 @@ local map_logsr = { -- Logical, shifted register.
|
|||||||
{
|
{
|
||||||
shift = 29, mask = 3,
|
shift = 29, mask = 3,
|
||||||
[0] = {
|
[0] = {
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg",
|
[0] = "andDNMSg", "bicDNMSg"
|
||||||
"andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg",
|
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg"
|
||||||
"orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg",
|
[0] = "eorDNMSg", "eonDNMSg"
|
||||||
"eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg",
|
[0] = "ands|tstD0NMSg", "bicsDNMSg"
|
||||||
"ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -735,7 +727,7 @@ local map_cond = {
|
|||||||
"hi", "ls", "ge", "lt", "gt", "le", "al",
|
"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 = {
|
local map_extend = {
|
||||||
[0] = "uxtb", "uxth", "uxtw", "uxtx", "sxtb", "sxth", "sxtw", "sxtx",
|
[0] = "uxtb", "uxth", "uxtw", "uxtx", "sxtb", "sxth", "sxtw", "sxtx",
|
||||||
@@ -956,7 +948,7 @@ local function disass_ins(ctx)
|
|||||||
elseif p == "U" then
|
elseif p == "U" then
|
||||||
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
||||||
local sz = band(rshift(op, 30), 3)
|
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
|
if imm12 ~= 0 then
|
||||||
x = "["..rn..", #"..imm12.."]"
|
x = "["..rn..", #"..imm12.."]"
|
||||||
else
|
else
|
||||||
@@ -993,8 +985,7 @@ local function disass_ins(ctx)
|
|||||||
x = x.."]"
|
x = x.."]"
|
||||||
end
|
end
|
||||||
elseif p == "P" then
|
elseif p == "P" then
|
||||||
local opcv, sh = rshift(op, 26), 2
|
local sh = 2 + rshift(op, 31 - band(rshift(op, 26), 1))
|
||||||
if opcv >= 0x2a then sh = 4 elseif opcv >= 0x1b then sh = 3 end
|
|
||||||
local imm7 = lshift(arshift(lshift(op, 10), 25), sh)
|
local imm7 = lshift(arshift(lshift(op, 10), 25), sh)
|
||||||
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
||||||
local ind = band(rshift(op, 23), 3)
|
local ind = band(rshift(op, 23), 3)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT ARM64BE disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- ARM64 instructions are always little-endian. So just forward to the
|
-- ARM64 instructions are always little-endian. So just forward to the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS disassembler module.
|
-- 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
|
-- 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.
|
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS64 disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the big-endian functions from the
|
-- This module just exports the big-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS64EL disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the little-endian functions from the
|
-- This module just exports the little-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS64R6 disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the r6 big-endian functions from the
|
-- This module just exports the r6 big-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS64R6EL disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the r6 little-endian functions from the
|
-- This module just exports the r6 little-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPSEL disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the little-endian functions from the
|
-- This module just exports the little-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT PPC disassembler module.
|
-- 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
|
-- 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.
|
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT x64 disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the 64 bit functions from the combined
|
-- This module just exports the 64 bit functions from the combined
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT x86/x64 disassembler module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT compiler dump module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -55,7 +55,6 @@
|
|||||||
|
|
||||||
-- Cache some library functions and objects.
|
-- Cache some library functions and objects.
|
||||||
local jit = require("jit")
|
local jit = require("jit")
|
||||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
|
||||||
local jutil = require("jit.util")
|
local jutil = require("jit.util")
|
||||||
local vmdef = require("jit.vmdef")
|
local vmdef = require("jit.vmdef")
|
||||||
local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc
|
local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT profiler.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -41,7 +41,6 @@
|
|||||||
|
|
||||||
-- Cache some library functions and objects.
|
-- Cache some library functions and objects.
|
||||||
local jit = require("jit")
|
local jit = require("jit")
|
||||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
|
||||||
local profile = require("jit.profile")
|
local profile = require("jit.profile")
|
||||||
local vmdef = require("jit.vmdef")
|
local vmdef = require("jit.vmdef")
|
||||||
local math = math
|
local math = math
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- Verbose mode of the LuaJIT compiler.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -59,7 +59,6 @@
|
|||||||
|
|
||||||
-- Cache some library functions and objects.
|
-- Cache some library functions and objects.
|
||||||
local jit = require("jit")
|
local jit = require("jit")
|
||||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
|
||||||
local jutil = require("jit.util")
|
local jutil = require("jit.util")
|
||||||
local vmdef = require("jit.vmdef")
|
local vmdef = require("jit.vmdef")
|
||||||
local funcinfo, traceinfo = jutil.funcinfo, jutil.traceinfo
|
local funcinfo, traceinfo = jutil.funcinfo, jutil.traceinfo
|
||||||
|
|||||||
@@ -1,395 +1,396 @@
|
|||||||
-- This is a generated file. DO NOT EDIT!
|
-- This is a generated file. DO NOT EDIT!
|
||||||
|
|
||||||
return {
|
assert(require("jit").version == "LuaJIT 2.1.1700008891", "LuaJIT core/library version mismatch")
|
||||||
|
|
||||||
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",
|
return {
|
||||||
|
|
||||||
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 ",
|
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",
|
||||||
|
|
||||||
irfpm = { [0]="floor", "ceil", "trunc", "sqrt", "log", "log2", "other", },
|
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 ",
|
||||||
|
|
||||||
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", },
|
irfpm = { [0]="floor", "ceil", "trunc", "sqrt", "log", "log2", "other", },
|
||||||
|
|
||||||
ircall = {
|
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", },
|
||||||
[0]="lj_str_cmp",
|
|
||||||
"lj_str_find",
|
ircall = {
|
||||||
"lj_str_new",
|
[0]="lj_str_cmp",
|
||||||
"lj_strscan_num",
|
"lj_str_find",
|
||||||
"lj_strfmt_int",
|
"lj_str_new",
|
||||||
"lj_strfmt_num",
|
"lj_strscan_num",
|
||||||
"lj_strfmt_char",
|
"lj_strfmt_int",
|
||||||
"lj_strfmt_putint",
|
"lj_strfmt_num",
|
||||||
"lj_strfmt_putnum",
|
"lj_strfmt_char",
|
||||||
"lj_strfmt_putquoted",
|
"lj_strfmt_putint",
|
||||||
"lj_strfmt_putfxint",
|
"lj_strfmt_putnum",
|
||||||
"lj_strfmt_putfnum_int",
|
"lj_strfmt_putquoted",
|
||||||
"lj_strfmt_putfnum_uint",
|
"lj_strfmt_putfxint",
|
||||||
"lj_strfmt_putfnum",
|
"lj_strfmt_putfnum_int",
|
||||||
"lj_strfmt_putfstr",
|
"lj_strfmt_putfnum_uint",
|
||||||
"lj_strfmt_putfchar",
|
"lj_strfmt_putfnum",
|
||||||
"lj_buf_putmem",
|
"lj_strfmt_putfstr",
|
||||||
"lj_buf_putstr",
|
"lj_strfmt_putfchar",
|
||||||
"lj_buf_putchar",
|
"lj_buf_putmem",
|
||||||
"lj_buf_putstr_reverse",
|
"lj_buf_putstr",
|
||||||
"lj_buf_putstr_lower",
|
"lj_buf_putchar",
|
||||||
"lj_buf_putstr_upper",
|
"lj_buf_putstr_reverse",
|
||||||
"lj_buf_putstr_rep",
|
"lj_buf_putstr_lower",
|
||||||
"lj_buf_puttab",
|
"lj_buf_putstr_upper",
|
||||||
"lj_bufx_set",
|
"lj_buf_putstr_rep",
|
||||||
"lj_bufx_more",
|
"lj_buf_puttab",
|
||||||
"lj_serialize_put",
|
"lj_bufx_set",
|
||||||
"lj_serialize_get",
|
"lj_bufx_more",
|
||||||
"lj_serialize_encode",
|
"lj_serialize_put",
|
||||||
"lj_serialize_decode",
|
"lj_serialize_get",
|
||||||
"lj_buf_tostr",
|
"lj_serialize_encode",
|
||||||
"lj_tab_new_ah",
|
"lj_serialize_decode",
|
||||||
"lj_tab_new1",
|
"lj_buf_tostr",
|
||||||
"lj_tab_dup",
|
"lj_tab_new_ah",
|
||||||
"lj_tab_clear",
|
"lj_tab_new1",
|
||||||
"lj_tab_newkey",
|
"lj_tab_dup",
|
||||||
"lj_tab_keyindex",
|
"lj_tab_clear",
|
||||||
"lj_vm_next",
|
"lj_tab_newkey",
|
||||||
"lj_tab_len",
|
"lj_tab_keyindex",
|
||||||
"lj_tab_len_hint",
|
"lj_vm_next",
|
||||||
"lj_gc_step_jit",
|
"lj_tab_len",
|
||||||
"lj_gc_barrieruv",
|
"lj_tab_len_hint",
|
||||||
"lj_mem_newgco",
|
"lj_gc_step_jit",
|
||||||
"lj_prng_u64d",
|
"lj_gc_barrieruv",
|
||||||
"lj_vm_modi",
|
"lj_mem_newgco",
|
||||||
"log10",
|
"lj_prng_u64d",
|
||||||
"exp",
|
"lj_vm_modi",
|
||||||
"sin",
|
"log10",
|
||||||
"cos",
|
"exp",
|
||||||
"tan",
|
"sin",
|
||||||
"asin",
|
"cos",
|
||||||
"acos",
|
"tan",
|
||||||
"atan",
|
"asin",
|
||||||
"sinh",
|
"acos",
|
||||||
"cosh",
|
"atan",
|
||||||
"tanh",
|
"sinh",
|
||||||
"fputc",
|
"cosh",
|
||||||
"fwrite",
|
"tanh",
|
||||||
"fflush",
|
"fputc",
|
||||||
"lj_vm_floor",
|
"fwrite",
|
||||||
"lj_vm_ceil",
|
"fflush",
|
||||||
"lj_vm_trunc",
|
"lj_vm_floor",
|
||||||
"sqrt",
|
"lj_vm_ceil",
|
||||||
"log",
|
"lj_vm_trunc",
|
||||||
"lj_vm_log2",
|
"sqrt",
|
||||||
"lj_vm_powi",
|
"log",
|
||||||
"pow",
|
"lj_vm_log2",
|
||||||
"atan2",
|
"pow",
|
||||||
"ldexp",
|
"atan2",
|
||||||
"lj_vm_tobit",
|
"ldexp",
|
||||||
"softfp_add",
|
"lj_vm_tobit",
|
||||||
"softfp_sub",
|
"softfp_add",
|
||||||
"softfp_mul",
|
"softfp_sub",
|
||||||
"softfp_div",
|
"softfp_mul",
|
||||||
"softfp_cmp",
|
"softfp_div",
|
||||||
"softfp_i2d",
|
"softfp_cmp",
|
||||||
"softfp_d2i",
|
"softfp_i2d",
|
||||||
"lj_vm_sfmin",
|
"softfp_d2i",
|
||||||
"lj_vm_sfmax",
|
"lj_vm_sfmin",
|
||||||
"lj_vm_tointg",
|
"lj_vm_sfmax",
|
||||||
"softfp_ui2d",
|
"lj_vm_tointg",
|
||||||
"softfp_f2d",
|
"softfp_ui2d",
|
||||||
"softfp_d2ui",
|
"softfp_f2d",
|
||||||
"softfp_d2f",
|
"softfp_d2ui",
|
||||||
"softfp_i2f",
|
"softfp_d2f",
|
||||||
"softfp_ui2f",
|
"softfp_i2f",
|
||||||
"softfp_f2i",
|
"softfp_ui2f",
|
||||||
"softfp_f2ui",
|
"softfp_f2i",
|
||||||
"fp64_l2d",
|
"softfp_f2ui",
|
||||||
"fp64_ul2d",
|
"fp64_l2d",
|
||||||
"fp64_l2f",
|
"fp64_ul2d",
|
||||||
"fp64_ul2f",
|
"fp64_l2f",
|
||||||
"fp64_d2l",
|
"fp64_ul2f",
|
||||||
"fp64_d2ul",
|
"fp64_d2l",
|
||||||
"fp64_f2l",
|
"fp64_d2ul",
|
||||||
"fp64_f2ul",
|
"fp64_f2l",
|
||||||
"lj_carith_divi64",
|
"fp64_f2ul",
|
||||||
"lj_carith_divu64",
|
"lj_carith_divi64",
|
||||||
"lj_carith_modi64",
|
"lj_carith_divu64",
|
||||||
"lj_carith_modu64",
|
"lj_carith_modi64",
|
||||||
"lj_carith_powi64",
|
"lj_carith_modu64",
|
||||||
"lj_carith_powu64",
|
"lj_carith_powi64",
|
||||||
"lj_cdata_newv",
|
"lj_carith_powu64",
|
||||||
"lj_cdata_setfin",
|
"lj_cdata_newv",
|
||||||
"strlen",
|
"lj_cdata_setfin",
|
||||||
"memcpy",
|
"strlen",
|
||||||
"memset",
|
"memcpy",
|
||||||
"lj_vm_errno",
|
"memset",
|
||||||
"lj_carith_mul64",
|
"lj_vm_errno",
|
||||||
"lj_carith_shl64",
|
"lj_carith_mul64",
|
||||||
"lj_carith_shr64",
|
"lj_carith_shl64",
|
||||||
"lj_carith_sar64",
|
"lj_carith_shr64",
|
||||||
"lj_carith_rol64",
|
"lj_carith_sar64",
|
||||||
"lj_carith_ror64",
|
"lj_carith_rol64",
|
||||||
},
|
"lj_carith_ror64",
|
||||||
|
},
|
||||||
traceerr = {
|
|
||||||
[0]="error thrown or hook called during recording",
|
traceerr = {
|
||||||
"trace too short",
|
[0]="error thrown or hook called during recording",
|
||||||
"trace too long",
|
"trace too short",
|
||||||
"trace too deep",
|
"trace too long",
|
||||||
"too many snapshots",
|
"trace too deep",
|
||||||
"blacklisted",
|
"too many snapshots",
|
||||||
"retry recording",
|
"blacklisted",
|
||||||
"NYI: bytecode %d",
|
"retry recording",
|
||||||
"leaving loop in root trace",
|
"NYI: bytecode %d",
|
||||||
"inner loop in root trace",
|
"leaving loop in root trace",
|
||||||
"loop unroll limit reached",
|
"inner loop in root trace",
|
||||||
"bad argument type",
|
"loop unroll limit reached",
|
||||||
"JIT compilation disabled for function",
|
"bad argument type",
|
||||||
"call unroll limit reached",
|
"JIT compilation disabled for function",
|
||||||
"down-recursion, restarting",
|
"call unroll limit reached",
|
||||||
"NYI: unsupported variant of FastFunc %s",
|
"down-recursion, restarting",
|
||||||
"NYI: return to lower frame",
|
"NYI: unsupported variant of FastFunc %s",
|
||||||
"store with nil or NaN key",
|
"NYI: return to lower frame",
|
||||||
"missing metamethod",
|
"store with nil or NaN key",
|
||||||
"looping index lookup",
|
"missing metamethod",
|
||||||
"NYI: mixed sparse/dense table",
|
"looping index lookup",
|
||||||
"symbol not in cache",
|
"NYI: mixed sparse/dense table",
|
||||||
"NYI: unsupported C type conversion",
|
"symbol not in cache",
|
||||||
"NYI: unsupported C function type",
|
"NYI: unsupported C type conversion",
|
||||||
"guard would always fail",
|
"NYI: unsupported C function type",
|
||||||
"too many PHIs",
|
"guard would always fail",
|
||||||
"persistent type instability",
|
"too many PHIs",
|
||||||
"failed to allocate mcode memory",
|
"persistent type instability",
|
||||||
"machine code too long",
|
"failed to allocate mcode memory",
|
||||||
"hit mcode limit (retrying)",
|
"machine code too long",
|
||||||
"too many spill slots",
|
"hit mcode limit (retrying)",
|
||||||
"inconsistent register allocation",
|
"too many spill slots",
|
||||||
"NYI: cannot assemble IR instruction %d",
|
"inconsistent register allocation",
|
||||||
"NYI: PHI shuffling too complex",
|
"NYI: cannot assemble IR instruction %d",
|
||||||
"NYI: register coalescing too complex",
|
"NYI: PHI shuffling too complex",
|
||||||
},
|
"NYI: register coalescing too complex",
|
||||||
|
},
|
||||||
ffnames = {
|
|
||||||
[0]="Lua",
|
ffnames = {
|
||||||
"C",
|
[0]="Lua",
|
||||||
"assert",
|
"C",
|
||||||
"type",
|
"assert",
|
||||||
"next",
|
"type",
|
||||||
"pairs",
|
"next",
|
||||||
"ipairs_aux",
|
"pairs",
|
||||||
"ipairs",
|
"ipairs_aux",
|
||||||
"getmetatable",
|
"ipairs",
|
||||||
"setmetatable",
|
"getmetatable",
|
||||||
"getfenv",
|
"setmetatable",
|
||||||
"setfenv",
|
"getfenv",
|
||||||
"rawget",
|
"setfenv",
|
||||||
"rawset",
|
"rawget",
|
||||||
"rawequal",
|
"rawset",
|
||||||
"unpack",
|
"rawequal",
|
||||||
"select",
|
"unpack",
|
||||||
"tonumber",
|
"select",
|
||||||
"tostring",
|
"tonumber",
|
||||||
"error",
|
"tostring",
|
||||||
"pcall",
|
"error",
|
||||||
"xpcall",
|
"pcall",
|
||||||
"loadfile",
|
"xpcall",
|
||||||
"load",
|
"loadfile",
|
||||||
"loadstring",
|
"load",
|
||||||
"dofile",
|
"loadstring",
|
||||||
"gcinfo",
|
"dofile",
|
||||||
"collectgarbage",
|
"gcinfo",
|
||||||
"newproxy",
|
"collectgarbage",
|
||||||
"print",
|
"newproxy",
|
||||||
"coroutine.status",
|
"print",
|
||||||
"coroutine.running",
|
"coroutine.status",
|
||||||
"coroutine.isyieldable",
|
"coroutine.running",
|
||||||
"coroutine.create",
|
"coroutine.isyieldable",
|
||||||
"coroutine.yield",
|
"coroutine.create",
|
||||||
"coroutine.resume",
|
"coroutine.yield",
|
||||||
"coroutine.wrap_aux",
|
"coroutine.resume",
|
||||||
"coroutine.wrap",
|
"coroutine.wrap_aux",
|
||||||
"math.abs",
|
"coroutine.wrap",
|
||||||
"math.floor",
|
"math.abs",
|
||||||
"math.ceil",
|
"math.floor",
|
||||||
"math.sqrt",
|
"math.ceil",
|
||||||
"math.log10",
|
"math.sqrt",
|
||||||
"math.exp",
|
"math.log10",
|
||||||
"math.sin",
|
"math.exp",
|
||||||
"math.cos",
|
"math.sin",
|
||||||
"math.tan",
|
"math.cos",
|
||||||
"math.asin",
|
"math.tan",
|
||||||
"math.acos",
|
"math.asin",
|
||||||
"math.atan",
|
"math.acos",
|
||||||
"math.sinh",
|
"math.atan",
|
||||||
"math.cosh",
|
"math.sinh",
|
||||||
"math.tanh",
|
"math.cosh",
|
||||||
"math.frexp",
|
"math.tanh",
|
||||||
"math.modf",
|
"math.frexp",
|
||||||
"math.log",
|
"math.modf",
|
||||||
"math.atan2",
|
"math.log",
|
||||||
"math.pow",
|
"math.atan2",
|
||||||
"math.fmod",
|
"math.pow",
|
||||||
"math.ldexp",
|
"math.fmod",
|
||||||
"math.min",
|
"math.ldexp",
|
||||||
"math.max",
|
"math.min",
|
||||||
"math.random",
|
"math.max",
|
||||||
"math.randomseed",
|
"math.random",
|
||||||
"bit.tobit",
|
"math.randomseed",
|
||||||
"bit.bnot",
|
"bit.tobit",
|
||||||
"bit.bswap",
|
"bit.bnot",
|
||||||
"bit.lshift",
|
"bit.bswap",
|
||||||
"bit.rshift",
|
"bit.lshift",
|
||||||
"bit.arshift",
|
"bit.rshift",
|
||||||
"bit.rol",
|
"bit.arshift",
|
||||||
"bit.ror",
|
"bit.rol",
|
||||||
"bit.band",
|
"bit.ror",
|
||||||
"bit.bor",
|
"bit.band",
|
||||||
"bit.bxor",
|
"bit.bor",
|
||||||
"bit.tohex",
|
"bit.bxor",
|
||||||
"string.byte",
|
"bit.tohex",
|
||||||
"string.char",
|
"string.byte",
|
||||||
"string.sub",
|
"string.char",
|
||||||
"string.rep",
|
"string.sub",
|
||||||
"string.reverse",
|
"string.rep",
|
||||||
"string.lower",
|
"string.reverse",
|
||||||
"string.upper",
|
"string.lower",
|
||||||
"string.dump",
|
"string.upper",
|
||||||
"string.find",
|
"string.dump",
|
||||||
"string.match",
|
"string.find",
|
||||||
"string.gmatch_aux",
|
"string.match",
|
||||||
"string.gmatch",
|
"string.gmatch_aux",
|
||||||
"string.gsub",
|
"string.gmatch",
|
||||||
"string.format",
|
"string.gsub",
|
||||||
"table.maxn",
|
"string.format",
|
||||||
"table.insert",
|
"table.maxn",
|
||||||
"table.concat",
|
"table.insert",
|
||||||
"table.sort",
|
"table.concat",
|
||||||
"table.new",
|
"table.sort",
|
||||||
"table.clear",
|
"table.new",
|
||||||
"io.method.close",
|
"table.clear",
|
||||||
"io.method.read",
|
"io.method.close",
|
||||||
"io.method.write",
|
"io.method.read",
|
||||||
"io.method.flush",
|
"io.method.write",
|
||||||
"io.method.seek",
|
"io.method.flush",
|
||||||
"io.method.setvbuf",
|
"io.method.seek",
|
||||||
"io.method.lines",
|
"io.method.setvbuf",
|
||||||
"io.method.__gc",
|
"io.method.lines",
|
||||||
"io.method.__tostring",
|
"io.method.__gc",
|
||||||
"io.open",
|
"io.method.__tostring",
|
||||||
"io.popen",
|
"io.open",
|
||||||
"io.tmpfile",
|
"io.popen",
|
||||||
"io.close",
|
"io.tmpfile",
|
||||||
"io.read",
|
"io.close",
|
||||||
"io.write",
|
"io.read",
|
||||||
"io.flush",
|
"io.write",
|
||||||
"io.input",
|
"io.flush",
|
||||||
"io.output",
|
"io.input",
|
||||||
"io.lines",
|
"io.output",
|
||||||
"io.type",
|
"io.lines",
|
||||||
"os.execute",
|
"io.type",
|
||||||
"os.remove",
|
"os.execute",
|
||||||
"os.rename",
|
"os.remove",
|
||||||
"os.tmpname",
|
"os.rename",
|
||||||
"os.getenv",
|
"os.tmpname",
|
||||||
"os.exit",
|
"os.getenv",
|
||||||
"os.clock",
|
"os.exit",
|
||||||
"os.date",
|
"os.clock",
|
||||||
"os.time",
|
"os.date",
|
||||||
"os.difftime",
|
"os.time",
|
||||||
"os.setlocale",
|
"os.difftime",
|
||||||
"debug.getregistry",
|
"os.setlocale",
|
||||||
"debug.getmetatable",
|
"debug.getregistry",
|
||||||
"debug.setmetatable",
|
"debug.getmetatable",
|
||||||
"debug.getfenv",
|
"debug.setmetatable",
|
||||||
"debug.setfenv",
|
"debug.getfenv",
|
||||||
"debug.getinfo",
|
"debug.setfenv",
|
||||||
"debug.getlocal",
|
"debug.getinfo",
|
||||||
"debug.setlocal",
|
"debug.getlocal",
|
||||||
"debug.getupvalue",
|
"debug.setlocal",
|
||||||
"debug.setupvalue",
|
"debug.getupvalue",
|
||||||
"debug.upvalueid",
|
"debug.setupvalue",
|
||||||
"debug.upvaluejoin",
|
"debug.upvalueid",
|
||||||
"debug.sethook",
|
"debug.upvaluejoin",
|
||||||
"debug.gethook",
|
"debug.sethook",
|
||||||
"debug.debug",
|
"debug.gethook",
|
||||||
"debug.traceback",
|
"debug.debug",
|
||||||
"jit.on",
|
"debug.traceback",
|
||||||
"jit.off",
|
"jit.on",
|
||||||
"jit.flush",
|
"jit.off",
|
||||||
"jit.status",
|
"jit.flush",
|
||||||
"jit.security",
|
"jit.status",
|
||||||
"jit.attach",
|
"jit.security",
|
||||||
"jit.util.funcinfo",
|
"jit.attach",
|
||||||
"jit.util.funcbc",
|
"jit.util.funcinfo",
|
||||||
"jit.util.funck",
|
"jit.util.funcbc",
|
||||||
"jit.util.funcuvname",
|
"jit.util.funck",
|
||||||
"jit.util.traceinfo",
|
"jit.util.funcuvname",
|
||||||
"jit.util.traceir",
|
"jit.util.traceinfo",
|
||||||
"jit.util.tracek",
|
"jit.util.traceir",
|
||||||
"jit.util.tracesnap",
|
"jit.util.tracek",
|
||||||
"jit.util.tracemc",
|
"jit.util.tracesnap",
|
||||||
"jit.util.traceexitstub",
|
"jit.util.tracemc",
|
||||||
"jit.util.ircalladdr",
|
"jit.util.traceexitstub",
|
||||||
"jit.opt.start",
|
"jit.util.ircalladdr",
|
||||||
"jit.profile.start",
|
"jit.opt.start",
|
||||||
"jit.profile.stop",
|
"jit.profile.start",
|
||||||
"jit.profile.dumpstack",
|
"jit.profile.stop",
|
||||||
"ffi.meta.__index",
|
"jit.profile.dumpstack",
|
||||||
"ffi.meta.__newindex",
|
"ffi.meta.__index",
|
||||||
"ffi.meta.__eq",
|
"ffi.meta.__newindex",
|
||||||
"ffi.meta.__len",
|
"ffi.meta.__eq",
|
||||||
"ffi.meta.__lt",
|
"ffi.meta.__len",
|
||||||
"ffi.meta.__le",
|
"ffi.meta.__lt",
|
||||||
"ffi.meta.__concat",
|
"ffi.meta.__le",
|
||||||
"ffi.meta.__call",
|
"ffi.meta.__concat",
|
||||||
"ffi.meta.__add",
|
"ffi.meta.__call",
|
||||||
"ffi.meta.__sub",
|
"ffi.meta.__add",
|
||||||
"ffi.meta.__mul",
|
"ffi.meta.__sub",
|
||||||
"ffi.meta.__div",
|
"ffi.meta.__mul",
|
||||||
"ffi.meta.__mod",
|
"ffi.meta.__div",
|
||||||
"ffi.meta.__pow",
|
"ffi.meta.__mod",
|
||||||
"ffi.meta.__unm",
|
"ffi.meta.__pow",
|
||||||
"ffi.meta.__tostring",
|
"ffi.meta.__unm",
|
||||||
"ffi.meta.__pairs",
|
"ffi.meta.__tostring",
|
||||||
"ffi.meta.__ipairs",
|
"ffi.meta.__pairs",
|
||||||
"ffi.clib.__index",
|
"ffi.meta.__ipairs",
|
||||||
"ffi.clib.__newindex",
|
"ffi.clib.__index",
|
||||||
"ffi.clib.__gc",
|
"ffi.clib.__newindex",
|
||||||
"ffi.callback.free",
|
"ffi.clib.__gc",
|
||||||
"ffi.callback.set",
|
"ffi.callback.free",
|
||||||
"ffi.cdef",
|
"ffi.callback.set",
|
||||||
"ffi.new",
|
"ffi.cdef",
|
||||||
"ffi.cast",
|
"ffi.new",
|
||||||
"ffi.typeof",
|
"ffi.cast",
|
||||||
"ffi.typeinfo",
|
"ffi.typeof",
|
||||||
"ffi.istype",
|
"ffi.typeinfo",
|
||||||
"ffi.sizeof",
|
"ffi.istype",
|
||||||
"ffi.alignof",
|
"ffi.sizeof",
|
||||||
"ffi.offsetof",
|
"ffi.alignof",
|
||||||
"ffi.errno",
|
"ffi.offsetof",
|
||||||
"ffi.string",
|
"ffi.errno",
|
||||||
"ffi.copy",
|
"ffi.string",
|
||||||
"ffi.fill",
|
"ffi.copy",
|
||||||
"ffi.abi",
|
"ffi.fill",
|
||||||
"ffi.metatype",
|
"ffi.abi",
|
||||||
"ffi.gc",
|
"ffi.metatype",
|
||||||
"ffi.load",
|
"ffi.gc",
|
||||||
"buffer.method.free",
|
"ffi.load",
|
||||||
"buffer.method.reset",
|
"buffer.method.free",
|
||||||
"buffer.method.skip",
|
"buffer.method.reset",
|
||||||
"buffer.method.set",
|
"buffer.method.skip",
|
||||||
"buffer.method.put",
|
"buffer.method.set",
|
||||||
"buffer.method.putf",
|
"buffer.method.put",
|
||||||
"buffer.method.get",
|
"buffer.method.putf",
|
||||||
"buffer.method.putcdata",
|
"buffer.method.get",
|
||||||
"buffer.method.reserve",
|
"buffer.method.putcdata",
|
||||||
"buffer.method.commit",
|
"buffer.method.reserve",
|
||||||
"buffer.method.ref",
|
"buffer.method.commit",
|
||||||
"buffer.method.encode",
|
"buffer.method.ref",
|
||||||
"buffer.method.decode",
|
"buffer.method.encode",
|
||||||
"buffer.method.__gc",
|
"buffer.method.decode",
|
||||||
"buffer.method.__tostring",
|
"buffer.method.__gc",
|
||||||
"buffer.method.__len",
|
"buffer.method.__tostring",
|
||||||
"buffer.new",
|
"buffer.method.__len",
|
||||||
"buffer.encode",
|
"buffer.new",
|
||||||
"buffer.decode",
|
"buffer.encode",
|
||||||
},
|
"buffer.decode",
|
||||||
|
},
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT profiler zones.
|
-- 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
|
-- 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.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -41,7 +41,6 @@
|
|||||||
|
|
||||||
-- Cache some library functions and objects.
|
-- Cache some library functions and objects.
|
||||||
local jit = require("jit")
|
local jit = require("jit")
|
||||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
|
||||||
local jutil = require("jit.util")
|
local jutil = require("jit.util")
|
||||||
local vmdef = require("jit.vmdef")
|
local vmdef = require("jit.vmdef")
|
||||||
local bit = require("bit")
|
local bit = require("bit")
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT module to save/list bytecode.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
local jit = require("jit")
|
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")
|
local bit = require("bit")
|
||||||
|
|
||||||
-- Symbol name prefix for LuaJIT bytecode.
|
-- 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).
|
-t type Set output file type (default: auto-detect from output name).
|
||||||
-a arch Override architecture for object files (default: native).
|
-a arch Override architecture for object files (default: native).
|
||||||
-o os Override OS 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.
|
-e chunk Use chunk string as input.
|
||||||
-- Stop handling options.
|
-- Stop handling options.
|
||||||
- Use stdin as input and/or stdout as output.
|
- 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)
|
os.exit(1)
|
||||||
end
|
end
|
||||||
@@ -49,10 +50,22 @@ local function check(ok, ...)
|
|||||||
os.exit(1)
|
os.exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function readfile(input)
|
local function readfile(ctx, input)
|
||||||
if type(input) == "function" then return input end
|
if type(input) == "function" then return input end
|
||||||
if input == "-" then input = nil end
|
if ctx.filename then
|
||||||
return check(loadfile(input))
|
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
|
end
|
||||||
|
|
||||||
local function savefile(name, mode)
|
local function savefile(name, mode)
|
||||||
@@ -68,7 +81,7 @@ end
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
local map_type = {
|
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 = {
|
local map_arch = {
|
||||||
@@ -456,18 +469,18 @@ typedef struct {
|
|||||||
uint32_t value;
|
uint32_t value;
|
||||||
} mach_nlist;
|
} mach_nlist;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t strx;
|
int32_t strx;
|
||||||
uint8_t type, sect;
|
uint8_t type, sect;
|
||||||
uint16_t desc;
|
uint16_t desc;
|
||||||
uint64_t value;
|
uint64_t value;
|
||||||
} mach_nlist_64;
|
} mach_nlist_64;
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t magic, nfat_arch;
|
int32_t magic, nfat_arch;
|
||||||
} mach_fat_header;
|
} mach_fat_header;
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t cputype, cpusubtype, offset, size, align;
|
int32_t cputype, cpusubtype, offset, size, align;
|
||||||
} mach_fat_arch;
|
} mach_fat_arch;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct {
|
struct {
|
||||||
@@ -501,6 +514,18 @@ typedef struct {
|
|||||||
mach_nlist sym_entry;
|
mach_nlist sym_entry;
|
||||||
uint8_t space[4096];
|
uint8_t space[4096];
|
||||||
} mach_fat_obj;
|
} 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 symname = '_'..LJBC_PREFIX..ctx.modname
|
||||||
local isfat, is64, align, mobj = false, false, 4, "mach_obj"
|
local isfat, is64, align, mobj = false, false, 4, "mach_obj"
|
||||||
@@ -509,7 +534,7 @@ typedef struct {
|
|||||||
elseif ctx.arch == "arm" then
|
elseif ctx.arch == "arm" then
|
||||||
isfat, mobj = true, "mach_fat_obj"
|
isfat, mobj = true, "mach_fat_obj"
|
||||||
elseif ctx.arch == "arm64" then
|
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
|
else
|
||||||
check(ctx.arch == "x86", "unsupported architecture for OSX")
|
check(ctx.arch == "x86", "unsupported architecture for OSX")
|
||||||
end
|
end
|
||||||
@@ -592,13 +617,13 @@ end
|
|||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
local function bclist(input, output)
|
local function bclist(ctx, input, output)
|
||||||
local f = readfile(input)
|
local f = readfile(ctx, input)
|
||||||
require("jit.bc").dump(f, savefile(output, "w"), true)
|
require("jit.bc").dump(f, savefile(output, "w"), true)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function bcsave(ctx, input, output)
|
local function bcsave(ctx, input, output)
|
||||||
local f = readfile(input)
|
local f = readfile(ctx, input)
|
||||||
local s = string.dump(f, ctx.strip)
|
local s = string.dump(f, ctx.strip)
|
||||||
local t = ctx.type
|
local t = ctx.type
|
||||||
if not t then
|
if not t then
|
||||||
@@ -651,6 +676,8 @@ local function docmd(...)
|
|||||||
ctx.arch = checkarg(tremove(arg, n), map_arch, "architecture")
|
ctx.arch = checkarg(tremove(arg, n), map_arch, "architecture")
|
||||||
elseif opt == "o" then
|
elseif opt == "o" then
|
||||||
ctx.os = checkarg(tremove(arg, n), map_os, "OS name")
|
ctx.os = checkarg(tremove(arg, n), map_os, "OS name")
|
||||||
|
elseif opt == "F" then
|
||||||
|
ctx.filename = "@"..tremove(arg, n)
|
||||||
else
|
else
|
||||||
usage()
|
usage()
|
||||||
end
|
end
|
||||||
@@ -662,7 +689,7 @@ local function docmd(...)
|
|||||||
end
|
end
|
||||||
if list then
|
if list then
|
||||||
if #arg == 0 or #arg > 2 then usage() end
|
if #arg == 0 or #arg > 2 then usage() end
|
||||||
bclist(arg[1], arg[2] or "-")
|
bclist(ctx, arg[1], arg[2] or "-")
|
||||||
else
|
else
|
||||||
if #arg ~= 2 then usage() end
|
if #arg ~= 2 then usage() end
|
||||||
bcsave(ctx, arg[1], arg[2])
|
bcsave(ctx, arg[1], arg[2])
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT ARM disassembler module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT ARM64 disassembler module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
--
|
--
|
||||||
-- Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com.
|
-- Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com.
|
||||||
@@ -107,24 +107,20 @@ local map_logsr = { -- Logical, shifted register.
|
|||||||
[0] = {
|
[0] = {
|
||||||
shift = 29, mask = 3,
|
shift = 29, mask = 3,
|
||||||
[0] = {
|
[0] = {
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg",
|
[0] = "andDNMSg", "bicDNMSg"
|
||||||
"andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] ="orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg",
|
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg"
|
||||||
"orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg",
|
[0] = "eorDNMSg", "eonDNMSg"
|
||||||
"eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg",
|
[0] = "ands|tstD0NMSg", "bicsDNMSg"
|
||||||
"ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
false -- unallocated
|
false -- unallocated
|
||||||
@@ -132,24 +128,20 @@ local map_logsr = { -- Logical, shifted register.
|
|||||||
{
|
{
|
||||||
shift = 29, mask = 3,
|
shift = 29, mask = 3,
|
||||||
[0] = {
|
[0] = {
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg",
|
[0] = "andDNMSg", "bicDNMSg"
|
||||||
"andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg",
|
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg"
|
||||||
"orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg",
|
[0] = "eorDNMSg", "eonDNMSg"
|
||||||
"eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg",
|
[0] = "ands|tstD0NMSg", "bicsDNMSg"
|
||||||
"ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -735,7 +727,7 @@ local map_cond = {
|
|||||||
"hi", "ls", "ge", "lt", "gt", "le", "al",
|
"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 = {
|
local map_extend = {
|
||||||
[0] = "uxtb", "uxth", "uxtw", "uxtx", "sxtb", "sxth", "sxtw", "sxtx",
|
[0] = "uxtb", "uxth", "uxtw", "uxtx", "sxtb", "sxth", "sxtw", "sxtx",
|
||||||
@@ -956,7 +948,7 @@ local function disass_ins(ctx)
|
|||||||
elseif p == "U" then
|
elseif p == "U" then
|
||||||
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
||||||
local sz = band(rshift(op, 30), 3)
|
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
|
if imm12 ~= 0 then
|
||||||
x = "["..rn..", #"..imm12.."]"
|
x = "["..rn..", #"..imm12.."]"
|
||||||
else
|
else
|
||||||
@@ -993,8 +985,7 @@ local function disass_ins(ctx)
|
|||||||
x = x.."]"
|
x = x.."]"
|
||||||
end
|
end
|
||||||
elseif p == "P" then
|
elseif p == "P" then
|
||||||
local opcv, sh = rshift(op, 26), 2
|
local sh = 2 + rshift(op, 31 - band(rshift(op, 26), 1))
|
||||||
if opcv >= 0x2a then sh = 4 elseif opcv >= 0x1b then sh = 3 end
|
|
||||||
local imm7 = lshift(arshift(lshift(op, 10), 25), sh)
|
local imm7 = lshift(arshift(lshift(op, 10), 25), sh)
|
||||||
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
||||||
local ind = band(rshift(op, 23), 3)
|
local ind = band(rshift(op, 23), 3)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT ARM64BE disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- ARM64 instructions are always little-endian. So just forward to the
|
-- ARM64 instructions are always little-endian. So just forward to the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS disassembler module.
|
-- 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
|
-- 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.
|
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS64 disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the big-endian functions from the
|
-- This module just exports the big-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS64EL disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the little-endian functions from the
|
-- This module just exports the little-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS64R6 disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the r6 big-endian functions from the
|
-- This module just exports the r6 big-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS64R6EL disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the r6 little-endian functions from the
|
-- This module just exports the r6 little-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPSEL disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the little-endian functions from the
|
-- This module just exports the little-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT PPC disassembler module.
|
-- 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
|
-- 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.
|
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT x64 disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the 64 bit functions from the combined
|
-- This module just exports the 64 bit functions from the combined
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT x86/x64 disassembler module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT compiler dump module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -55,7 +55,6 @@
|
|||||||
|
|
||||||
-- Cache some library functions and objects.
|
-- Cache some library functions and objects.
|
||||||
local jit = require("jit")
|
local jit = require("jit")
|
||||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
|
||||||
local jutil = require("jit.util")
|
local jutil = require("jit.util")
|
||||||
local vmdef = require("jit.vmdef")
|
local vmdef = require("jit.vmdef")
|
||||||
local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc
|
local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT profiler.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -41,7 +41,6 @@
|
|||||||
|
|
||||||
-- Cache some library functions and objects.
|
-- Cache some library functions and objects.
|
||||||
local jit = require("jit")
|
local jit = require("jit")
|
||||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
|
||||||
local profile = require("jit.profile")
|
local profile = require("jit.profile")
|
||||||
local vmdef = require("jit.vmdef")
|
local vmdef = require("jit.vmdef")
|
||||||
local math = math
|
local math = math
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- Verbose mode of the LuaJIT compiler.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -59,7 +59,6 @@
|
|||||||
|
|
||||||
-- Cache some library functions and objects.
|
-- Cache some library functions and objects.
|
||||||
local jit = require("jit")
|
local jit = require("jit")
|
||||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
|
||||||
local jutil = require("jit.util")
|
local jutil = require("jit.util")
|
||||||
local vmdef = require("jit.vmdef")
|
local vmdef = require("jit.vmdef")
|
||||||
local funcinfo, traceinfo = jutil.funcinfo, jutil.traceinfo
|
local funcinfo, traceinfo = jutil.funcinfo, jutil.traceinfo
|
||||||
|
|||||||
@@ -1,395 +1,396 @@
|
|||||||
-- This is a generated file. DO NOT EDIT!
|
-- This is a generated file. DO NOT EDIT!
|
||||||
|
|
||||||
return {
|
assert(require("jit").version == "LuaJIT 2.1.1700008891", "LuaJIT core/library version mismatch")
|
||||||
|
|
||||||
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",
|
return {
|
||||||
|
|
||||||
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 ",
|
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",
|
||||||
|
|
||||||
irfpm = { [0]="floor", "ceil", "trunc", "sqrt", "log", "log2", "other", },
|
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 ",
|
||||||
|
|
||||||
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", },
|
irfpm = { [0]="floor", "ceil", "trunc", "sqrt", "log", "log2", "other", },
|
||||||
|
|
||||||
ircall = {
|
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", },
|
||||||
[0]="lj_str_cmp",
|
|
||||||
"lj_str_find",
|
ircall = {
|
||||||
"lj_str_new",
|
[0]="lj_str_cmp",
|
||||||
"lj_strscan_num",
|
"lj_str_find",
|
||||||
"lj_strfmt_int",
|
"lj_str_new",
|
||||||
"lj_strfmt_num",
|
"lj_strscan_num",
|
||||||
"lj_strfmt_char",
|
"lj_strfmt_int",
|
||||||
"lj_strfmt_putint",
|
"lj_strfmt_num",
|
||||||
"lj_strfmt_putnum",
|
"lj_strfmt_char",
|
||||||
"lj_strfmt_putquoted",
|
"lj_strfmt_putint",
|
||||||
"lj_strfmt_putfxint",
|
"lj_strfmt_putnum",
|
||||||
"lj_strfmt_putfnum_int",
|
"lj_strfmt_putquoted",
|
||||||
"lj_strfmt_putfnum_uint",
|
"lj_strfmt_putfxint",
|
||||||
"lj_strfmt_putfnum",
|
"lj_strfmt_putfnum_int",
|
||||||
"lj_strfmt_putfstr",
|
"lj_strfmt_putfnum_uint",
|
||||||
"lj_strfmt_putfchar",
|
"lj_strfmt_putfnum",
|
||||||
"lj_buf_putmem",
|
"lj_strfmt_putfstr",
|
||||||
"lj_buf_putstr",
|
"lj_strfmt_putfchar",
|
||||||
"lj_buf_putchar",
|
"lj_buf_putmem",
|
||||||
"lj_buf_putstr_reverse",
|
"lj_buf_putstr",
|
||||||
"lj_buf_putstr_lower",
|
"lj_buf_putchar",
|
||||||
"lj_buf_putstr_upper",
|
"lj_buf_putstr_reverse",
|
||||||
"lj_buf_putstr_rep",
|
"lj_buf_putstr_lower",
|
||||||
"lj_buf_puttab",
|
"lj_buf_putstr_upper",
|
||||||
"lj_bufx_set",
|
"lj_buf_putstr_rep",
|
||||||
"lj_bufx_more",
|
"lj_buf_puttab",
|
||||||
"lj_serialize_put",
|
"lj_bufx_set",
|
||||||
"lj_serialize_get",
|
"lj_bufx_more",
|
||||||
"lj_serialize_encode",
|
"lj_serialize_put",
|
||||||
"lj_serialize_decode",
|
"lj_serialize_get",
|
||||||
"lj_buf_tostr",
|
"lj_serialize_encode",
|
||||||
"lj_tab_new_ah",
|
"lj_serialize_decode",
|
||||||
"lj_tab_new1",
|
"lj_buf_tostr",
|
||||||
"lj_tab_dup",
|
"lj_tab_new_ah",
|
||||||
"lj_tab_clear",
|
"lj_tab_new1",
|
||||||
"lj_tab_newkey",
|
"lj_tab_dup",
|
||||||
"lj_tab_keyindex",
|
"lj_tab_clear",
|
||||||
"lj_vm_next",
|
"lj_tab_newkey",
|
||||||
"lj_tab_len",
|
"lj_tab_keyindex",
|
||||||
"lj_tab_len_hint",
|
"lj_vm_next",
|
||||||
"lj_gc_step_jit",
|
"lj_tab_len",
|
||||||
"lj_gc_barrieruv",
|
"lj_tab_len_hint",
|
||||||
"lj_mem_newgco",
|
"lj_gc_step_jit",
|
||||||
"lj_prng_u64d",
|
"lj_gc_barrieruv",
|
||||||
"lj_vm_modi",
|
"lj_mem_newgco",
|
||||||
"log10",
|
"lj_prng_u64d",
|
||||||
"exp",
|
"lj_vm_modi",
|
||||||
"sin",
|
"log10",
|
||||||
"cos",
|
"exp",
|
||||||
"tan",
|
"sin",
|
||||||
"asin",
|
"cos",
|
||||||
"acos",
|
"tan",
|
||||||
"atan",
|
"asin",
|
||||||
"sinh",
|
"acos",
|
||||||
"cosh",
|
"atan",
|
||||||
"tanh",
|
"sinh",
|
||||||
"fputc",
|
"cosh",
|
||||||
"fwrite",
|
"tanh",
|
||||||
"fflush",
|
"fputc",
|
||||||
"lj_vm_floor",
|
"fwrite",
|
||||||
"lj_vm_ceil",
|
"fflush",
|
||||||
"lj_vm_trunc",
|
"lj_vm_floor",
|
||||||
"sqrt",
|
"lj_vm_ceil",
|
||||||
"log",
|
"lj_vm_trunc",
|
||||||
"lj_vm_log2",
|
"sqrt",
|
||||||
"lj_vm_powi",
|
"log",
|
||||||
"pow",
|
"lj_vm_log2",
|
||||||
"atan2",
|
"pow",
|
||||||
"ldexp",
|
"atan2",
|
||||||
"lj_vm_tobit",
|
"ldexp",
|
||||||
"softfp_add",
|
"lj_vm_tobit",
|
||||||
"softfp_sub",
|
"softfp_add",
|
||||||
"softfp_mul",
|
"softfp_sub",
|
||||||
"softfp_div",
|
"softfp_mul",
|
||||||
"softfp_cmp",
|
"softfp_div",
|
||||||
"softfp_i2d",
|
"softfp_cmp",
|
||||||
"softfp_d2i",
|
"softfp_i2d",
|
||||||
"lj_vm_sfmin",
|
"softfp_d2i",
|
||||||
"lj_vm_sfmax",
|
"lj_vm_sfmin",
|
||||||
"lj_vm_tointg",
|
"lj_vm_sfmax",
|
||||||
"softfp_ui2d",
|
"lj_vm_tointg",
|
||||||
"softfp_f2d",
|
"softfp_ui2d",
|
||||||
"softfp_d2ui",
|
"softfp_f2d",
|
||||||
"softfp_d2f",
|
"softfp_d2ui",
|
||||||
"softfp_i2f",
|
"softfp_d2f",
|
||||||
"softfp_ui2f",
|
"softfp_i2f",
|
||||||
"softfp_f2i",
|
"softfp_ui2f",
|
||||||
"softfp_f2ui",
|
"softfp_f2i",
|
||||||
"fp64_l2d",
|
"softfp_f2ui",
|
||||||
"fp64_ul2d",
|
"fp64_l2d",
|
||||||
"fp64_l2f",
|
"fp64_ul2d",
|
||||||
"fp64_ul2f",
|
"fp64_l2f",
|
||||||
"fp64_d2l",
|
"fp64_ul2f",
|
||||||
"fp64_d2ul",
|
"fp64_d2l",
|
||||||
"fp64_f2l",
|
"fp64_d2ul",
|
||||||
"fp64_f2ul",
|
"fp64_f2l",
|
||||||
"lj_carith_divi64",
|
"fp64_f2ul",
|
||||||
"lj_carith_divu64",
|
"lj_carith_divi64",
|
||||||
"lj_carith_modi64",
|
"lj_carith_divu64",
|
||||||
"lj_carith_modu64",
|
"lj_carith_modi64",
|
||||||
"lj_carith_powi64",
|
"lj_carith_modu64",
|
||||||
"lj_carith_powu64",
|
"lj_carith_powi64",
|
||||||
"lj_cdata_newv",
|
"lj_carith_powu64",
|
||||||
"lj_cdata_setfin",
|
"lj_cdata_newv",
|
||||||
"strlen",
|
"lj_cdata_setfin",
|
||||||
"memcpy",
|
"strlen",
|
||||||
"memset",
|
"memcpy",
|
||||||
"lj_vm_errno",
|
"memset",
|
||||||
"lj_carith_mul64",
|
"lj_vm_errno",
|
||||||
"lj_carith_shl64",
|
"lj_carith_mul64",
|
||||||
"lj_carith_shr64",
|
"lj_carith_shl64",
|
||||||
"lj_carith_sar64",
|
"lj_carith_shr64",
|
||||||
"lj_carith_rol64",
|
"lj_carith_sar64",
|
||||||
"lj_carith_ror64",
|
"lj_carith_rol64",
|
||||||
},
|
"lj_carith_ror64",
|
||||||
|
},
|
||||||
traceerr = {
|
|
||||||
[0]="error thrown or hook called during recording",
|
traceerr = {
|
||||||
"trace too short",
|
[0]="error thrown or hook called during recording",
|
||||||
"trace too long",
|
"trace too short",
|
||||||
"trace too deep",
|
"trace too long",
|
||||||
"too many snapshots",
|
"trace too deep",
|
||||||
"blacklisted",
|
"too many snapshots",
|
||||||
"retry recording",
|
"blacklisted",
|
||||||
"NYI: bytecode %d",
|
"retry recording",
|
||||||
"leaving loop in root trace",
|
"NYI: bytecode %d",
|
||||||
"inner loop in root trace",
|
"leaving loop in root trace",
|
||||||
"loop unroll limit reached",
|
"inner loop in root trace",
|
||||||
"bad argument type",
|
"loop unroll limit reached",
|
||||||
"JIT compilation disabled for function",
|
"bad argument type",
|
||||||
"call unroll limit reached",
|
"JIT compilation disabled for function",
|
||||||
"down-recursion, restarting",
|
"call unroll limit reached",
|
||||||
"NYI: unsupported variant of FastFunc %s",
|
"down-recursion, restarting",
|
||||||
"NYI: return to lower frame",
|
"NYI: unsupported variant of FastFunc %s",
|
||||||
"store with nil or NaN key",
|
"NYI: return to lower frame",
|
||||||
"missing metamethod",
|
"store with nil or NaN key",
|
||||||
"looping index lookup",
|
"missing metamethod",
|
||||||
"NYI: mixed sparse/dense table",
|
"looping index lookup",
|
||||||
"symbol not in cache",
|
"NYI: mixed sparse/dense table",
|
||||||
"NYI: unsupported C type conversion",
|
"symbol not in cache",
|
||||||
"NYI: unsupported C function type",
|
"NYI: unsupported C type conversion",
|
||||||
"guard would always fail",
|
"NYI: unsupported C function type",
|
||||||
"too many PHIs",
|
"guard would always fail",
|
||||||
"persistent type instability",
|
"too many PHIs",
|
||||||
"failed to allocate mcode memory",
|
"persistent type instability",
|
||||||
"machine code too long",
|
"failed to allocate mcode memory",
|
||||||
"hit mcode limit (retrying)",
|
"machine code too long",
|
||||||
"too many spill slots",
|
"hit mcode limit (retrying)",
|
||||||
"inconsistent register allocation",
|
"too many spill slots",
|
||||||
"NYI: cannot assemble IR instruction %d",
|
"inconsistent register allocation",
|
||||||
"NYI: PHI shuffling too complex",
|
"NYI: cannot assemble IR instruction %d",
|
||||||
"NYI: register coalescing too complex",
|
"NYI: PHI shuffling too complex",
|
||||||
},
|
"NYI: register coalescing too complex",
|
||||||
|
},
|
||||||
ffnames = {
|
|
||||||
[0]="Lua",
|
ffnames = {
|
||||||
"C",
|
[0]="Lua",
|
||||||
"assert",
|
"C",
|
||||||
"type",
|
"assert",
|
||||||
"next",
|
"type",
|
||||||
"pairs",
|
"next",
|
||||||
"ipairs_aux",
|
"pairs",
|
||||||
"ipairs",
|
"ipairs_aux",
|
||||||
"getmetatable",
|
"ipairs",
|
||||||
"setmetatable",
|
"getmetatable",
|
||||||
"getfenv",
|
"setmetatable",
|
||||||
"setfenv",
|
"getfenv",
|
||||||
"rawget",
|
"setfenv",
|
||||||
"rawset",
|
"rawget",
|
||||||
"rawequal",
|
"rawset",
|
||||||
"unpack",
|
"rawequal",
|
||||||
"select",
|
"unpack",
|
||||||
"tonumber",
|
"select",
|
||||||
"tostring",
|
"tonumber",
|
||||||
"error",
|
"tostring",
|
||||||
"pcall",
|
"error",
|
||||||
"xpcall",
|
"pcall",
|
||||||
"loadfile",
|
"xpcall",
|
||||||
"load",
|
"loadfile",
|
||||||
"loadstring",
|
"load",
|
||||||
"dofile",
|
"loadstring",
|
||||||
"gcinfo",
|
"dofile",
|
||||||
"collectgarbage",
|
"gcinfo",
|
||||||
"newproxy",
|
"collectgarbage",
|
||||||
"print",
|
"newproxy",
|
||||||
"coroutine.status",
|
"print",
|
||||||
"coroutine.running",
|
"coroutine.status",
|
||||||
"coroutine.isyieldable",
|
"coroutine.running",
|
||||||
"coroutine.create",
|
"coroutine.isyieldable",
|
||||||
"coroutine.yield",
|
"coroutine.create",
|
||||||
"coroutine.resume",
|
"coroutine.yield",
|
||||||
"coroutine.wrap_aux",
|
"coroutine.resume",
|
||||||
"coroutine.wrap",
|
"coroutine.wrap_aux",
|
||||||
"math.abs",
|
"coroutine.wrap",
|
||||||
"math.floor",
|
"math.abs",
|
||||||
"math.ceil",
|
"math.floor",
|
||||||
"math.sqrt",
|
"math.ceil",
|
||||||
"math.log10",
|
"math.sqrt",
|
||||||
"math.exp",
|
"math.log10",
|
||||||
"math.sin",
|
"math.exp",
|
||||||
"math.cos",
|
"math.sin",
|
||||||
"math.tan",
|
"math.cos",
|
||||||
"math.asin",
|
"math.tan",
|
||||||
"math.acos",
|
"math.asin",
|
||||||
"math.atan",
|
"math.acos",
|
||||||
"math.sinh",
|
"math.atan",
|
||||||
"math.cosh",
|
"math.sinh",
|
||||||
"math.tanh",
|
"math.cosh",
|
||||||
"math.frexp",
|
"math.tanh",
|
||||||
"math.modf",
|
"math.frexp",
|
||||||
"math.log",
|
"math.modf",
|
||||||
"math.atan2",
|
"math.log",
|
||||||
"math.pow",
|
"math.atan2",
|
||||||
"math.fmod",
|
"math.pow",
|
||||||
"math.ldexp",
|
"math.fmod",
|
||||||
"math.min",
|
"math.ldexp",
|
||||||
"math.max",
|
"math.min",
|
||||||
"math.random",
|
"math.max",
|
||||||
"math.randomseed",
|
"math.random",
|
||||||
"bit.tobit",
|
"math.randomseed",
|
||||||
"bit.bnot",
|
"bit.tobit",
|
||||||
"bit.bswap",
|
"bit.bnot",
|
||||||
"bit.lshift",
|
"bit.bswap",
|
||||||
"bit.rshift",
|
"bit.lshift",
|
||||||
"bit.arshift",
|
"bit.rshift",
|
||||||
"bit.rol",
|
"bit.arshift",
|
||||||
"bit.ror",
|
"bit.rol",
|
||||||
"bit.band",
|
"bit.ror",
|
||||||
"bit.bor",
|
"bit.band",
|
||||||
"bit.bxor",
|
"bit.bor",
|
||||||
"bit.tohex",
|
"bit.bxor",
|
||||||
"string.byte",
|
"bit.tohex",
|
||||||
"string.char",
|
"string.byte",
|
||||||
"string.sub",
|
"string.char",
|
||||||
"string.rep",
|
"string.sub",
|
||||||
"string.reverse",
|
"string.rep",
|
||||||
"string.lower",
|
"string.reverse",
|
||||||
"string.upper",
|
"string.lower",
|
||||||
"string.dump",
|
"string.upper",
|
||||||
"string.find",
|
"string.dump",
|
||||||
"string.match",
|
"string.find",
|
||||||
"string.gmatch_aux",
|
"string.match",
|
||||||
"string.gmatch",
|
"string.gmatch_aux",
|
||||||
"string.gsub",
|
"string.gmatch",
|
||||||
"string.format",
|
"string.gsub",
|
||||||
"table.maxn",
|
"string.format",
|
||||||
"table.insert",
|
"table.maxn",
|
||||||
"table.concat",
|
"table.insert",
|
||||||
"table.sort",
|
"table.concat",
|
||||||
"table.new",
|
"table.sort",
|
||||||
"table.clear",
|
"table.new",
|
||||||
"io.method.close",
|
"table.clear",
|
||||||
"io.method.read",
|
"io.method.close",
|
||||||
"io.method.write",
|
"io.method.read",
|
||||||
"io.method.flush",
|
"io.method.write",
|
||||||
"io.method.seek",
|
"io.method.flush",
|
||||||
"io.method.setvbuf",
|
"io.method.seek",
|
||||||
"io.method.lines",
|
"io.method.setvbuf",
|
||||||
"io.method.__gc",
|
"io.method.lines",
|
||||||
"io.method.__tostring",
|
"io.method.__gc",
|
||||||
"io.open",
|
"io.method.__tostring",
|
||||||
"io.popen",
|
"io.open",
|
||||||
"io.tmpfile",
|
"io.popen",
|
||||||
"io.close",
|
"io.tmpfile",
|
||||||
"io.read",
|
"io.close",
|
||||||
"io.write",
|
"io.read",
|
||||||
"io.flush",
|
"io.write",
|
||||||
"io.input",
|
"io.flush",
|
||||||
"io.output",
|
"io.input",
|
||||||
"io.lines",
|
"io.output",
|
||||||
"io.type",
|
"io.lines",
|
||||||
"os.execute",
|
"io.type",
|
||||||
"os.remove",
|
"os.execute",
|
||||||
"os.rename",
|
"os.remove",
|
||||||
"os.tmpname",
|
"os.rename",
|
||||||
"os.getenv",
|
"os.tmpname",
|
||||||
"os.exit",
|
"os.getenv",
|
||||||
"os.clock",
|
"os.exit",
|
||||||
"os.date",
|
"os.clock",
|
||||||
"os.time",
|
"os.date",
|
||||||
"os.difftime",
|
"os.time",
|
||||||
"os.setlocale",
|
"os.difftime",
|
||||||
"debug.getregistry",
|
"os.setlocale",
|
||||||
"debug.getmetatable",
|
"debug.getregistry",
|
||||||
"debug.setmetatable",
|
"debug.getmetatable",
|
||||||
"debug.getfenv",
|
"debug.setmetatable",
|
||||||
"debug.setfenv",
|
"debug.getfenv",
|
||||||
"debug.getinfo",
|
"debug.setfenv",
|
||||||
"debug.getlocal",
|
"debug.getinfo",
|
||||||
"debug.setlocal",
|
"debug.getlocal",
|
||||||
"debug.getupvalue",
|
"debug.setlocal",
|
||||||
"debug.setupvalue",
|
"debug.getupvalue",
|
||||||
"debug.upvalueid",
|
"debug.setupvalue",
|
||||||
"debug.upvaluejoin",
|
"debug.upvalueid",
|
||||||
"debug.sethook",
|
"debug.upvaluejoin",
|
||||||
"debug.gethook",
|
"debug.sethook",
|
||||||
"debug.debug",
|
"debug.gethook",
|
||||||
"debug.traceback",
|
"debug.debug",
|
||||||
"jit.on",
|
"debug.traceback",
|
||||||
"jit.off",
|
"jit.on",
|
||||||
"jit.flush",
|
"jit.off",
|
||||||
"jit.status",
|
"jit.flush",
|
||||||
"jit.security",
|
"jit.status",
|
||||||
"jit.attach",
|
"jit.security",
|
||||||
"jit.util.funcinfo",
|
"jit.attach",
|
||||||
"jit.util.funcbc",
|
"jit.util.funcinfo",
|
||||||
"jit.util.funck",
|
"jit.util.funcbc",
|
||||||
"jit.util.funcuvname",
|
"jit.util.funck",
|
||||||
"jit.util.traceinfo",
|
"jit.util.funcuvname",
|
||||||
"jit.util.traceir",
|
"jit.util.traceinfo",
|
||||||
"jit.util.tracek",
|
"jit.util.traceir",
|
||||||
"jit.util.tracesnap",
|
"jit.util.tracek",
|
||||||
"jit.util.tracemc",
|
"jit.util.tracesnap",
|
||||||
"jit.util.traceexitstub",
|
"jit.util.tracemc",
|
||||||
"jit.util.ircalladdr",
|
"jit.util.traceexitstub",
|
||||||
"jit.opt.start",
|
"jit.util.ircalladdr",
|
||||||
"jit.profile.start",
|
"jit.opt.start",
|
||||||
"jit.profile.stop",
|
"jit.profile.start",
|
||||||
"jit.profile.dumpstack",
|
"jit.profile.stop",
|
||||||
"ffi.meta.__index",
|
"jit.profile.dumpstack",
|
||||||
"ffi.meta.__newindex",
|
"ffi.meta.__index",
|
||||||
"ffi.meta.__eq",
|
"ffi.meta.__newindex",
|
||||||
"ffi.meta.__len",
|
"ffi.meta.__eq",
|
||||||
"ffi.meta.__lt",
|
"ffi.meta.__len",
|
||||||
"ffi.meta.__le",
|
"ffi.meta.__lt",
|
||||||
"ffi.meta.__concat",
|
"ffi.meta.__le",
|
||||||
"ffi.meta.__call",
|
"ffi.meta.__concat",
|
||||||
"ffi.meta.__add",
|
"ffi.meta.__call",
|
||||||
"ffi.meta.__sub",
|
"ffi.meta.__add",
|
||||||
"ffi.meta.__mul",
|
"ffi.meta.__sub",
|
||||||
"ffi.meta.__div",
|
"ffi.meta.__mul",
|
||||||
"ffi.meta.__mod",
|
"ffi.meta.__div",
|
||||||
"ffi.meta.__pow",
|
"ffi.meta.__mod",
|
||||||
"ffi.meta.__unm",
|
"ffi.meta.__pow",
|
||||||
"ffi.meta.__tostring",
|
"ffi.meta.__unm",
|
||||||
"ffi.meta.__pairs",
|
"ffi.meta.__tostring",
|
||||||
"ffi.meta.__ipairs",
|
"ffi.meta.__pairs",
|
||||||
"ffi.clib.__index",
|
"ffi.meta.__ipairs",
|
||||||
"ffi.clib.__newindex",
|
"ffi.clib.__index",
|
||||||
"ffi.clib.__gc",
|
"ffi.clib.__newindex",
|
||||||
"ffi.callback.free",
|
"ffi.clib.__gc",
|
||||||
"ffi.callback.set",
|
"ffi.callback.free",
|
||||||
"ffi.cdef",
|
"ffi.callback.set",
|
||||||
"ffi.new",
|
"ffi.cdef",
|
||||||
"ffi.cast",
|
"ffi.new",
|
||||||
"ffi.typeof",
|
"ffi.cast",
|
||||||
"ffi.typeinfo",
|
"ffi.typeof",
|
||||||
"ffi.istype",
|
"ffi.typeinfo",
|
||||||
"ffi.sizeof",
|
"ffi.istype",
|
||||||
"ffi.alignof",
|
"ffi.sizeof",
|
||||||
"ffi.offsetof",
|
"ffi.alignof",
|
||||||
"ffi.errno",
|
"ffi.offsetof",
|
||||||
"ffi.string",
|
"ffi.errno",
|
||||||
"ffi.copy",
|
"ffi.string",
|
||||||
"ffi.fill",
|
"ffi.copy",
|
||||||
"ffi.abi",
|
"ffi.fill",
|
||||||
"ffi.metatype",
|
"ffi.abi",
|
||||||
"ffi.gc",
|
"ffi.metatype",
|
||||||
"ffi.load",
|
"ffi.gc",
|
||||||
"buffer.method.free",
|
"ffi.load",
|
||||||
"buffer.method.reset",
|
"buffer.method.free",
|
||||||
"buffer.method.skip",
|
"buffer.method.reset",
|
||||||
"buffer.method.set",
|
"buffer.method.skip",
|
||||||
"buffer.method.put",
|
"buffer.method.set",
|
||||||
"buffer.method.putf",
|
"buffer.method.put",
|
||||||
"buffer.method.get",
|
"buffer.method.putf",
|
||||||
"buffer.method.putcdata",
|
"buffer.method.get",
|
||||||
"buffer.method.reserve",
|
"buffer.method.putcdata",
|
||||||
"buffer.method.commit",
|
"buffer.method.reserve",
|
||||||
"buffer.method.ref",
|
"buffer.method.commit",
|
||||||
"buffer.method.encode",
|
"buffer.method.ref",
|
||||||
"buffer.method.decode",
|
"buffer.method.encode",
|
||||||
"buffer.method.__gc",
|
"buffer.method.decode",
|
||||||
"buffer.method.__tostring",
|
"buffer.method.__gc",
|
||||||
"buffer.method.__len",
|
"buffer.method.__tostring",
|
||||||
"buffer.new",
|
"buffer.method.__len",
|
||||||
"buffer.encode",
|
"buffer.new",
|
||||||
"buffer.decode",
|
"buffer.encode",
|
||||||
},
|
"buffer.decode",
|
||||||
|
},
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT profiler zones.
|
-- 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
|
-- 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.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -41,7 +41,6 @@
|
|||||||
|
|
||||||
-- Cache some library functions and objects.
|
-- Cache some library functions and objects.
|
||||||
local jit = require("jit")
|
local jit = require("jit")
|
||||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
|
||||||
local jutil = require("jit.util")
|
local jutil = require("jit.util")
|
||||||
local vmdef = require("jit.vmdef")
|
local vmdef = require("jit.vmdef")
|
||||||
local bit = require("bit")
|
local bit = require("bit")
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT module to save/list bytecode.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
local jit = require("jit")
|
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")
|
local bit = require("bit")
|
||||||
|
|
||||||
-- Symbol name prefix for LuaJIT bytecode.
|
-- 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).
|
-t type Set output file type (default: auto-detect from output name).
|
||||||
-a arch Override architecture for object files (default: native).
|
-a arch Override architecture for object files (default: native).
|
||||||
-o os Override OS 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.
|
-e chunk Use chunk string as input.
|
||||||
-- Stop handling options.
|
-- Stop handling options.
|
||||||
- Use stdin as input and/or stdout as output.
|
- 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)
|
os.exit(1)
|
||||||
end
|
end
|
||||||
@@ -49,10 +50,22 @@ local function check(ok, ...)
|
|||||||
os.exit(1)
|
os.exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function readfile(input)
|
local function readfile(ctx, input)
|
||||||
if type(input) == "function" then return input end
|
if type(input) == "function" then return input end
|
||||||
if input == "-" then input = nil end
|
if ctx.filename then
|
||||||
return check(loadfile(input))
|
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
|
end
|
||||||
|
|
||||||
local function savefile(name, mode)
|
local function savefile(name, mode)
|
||||||
@@ -68,7 +81,7 @@ end
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
local map_type = {
|
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 = {
|
local map_arch = {
|
||||||
@@ -456,18 +469,18 @@ typedef struct {
|
|||||||
uint32_t value;
|
uint32_t value;
|
||||||
} mach_nlist;
|
} mach_nlist;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t strx;
|
int32_t strx;
|
||||||
uint8_t type, sect;
|
uint8_t type, sect;
|
||||||
uint16_t desc;
|
uint16_t desc;
|
||||||
uint64_t value;
|
uint64_t value;
|
||||||
} mach_nlist_64;
|
} mach_nlist_64;
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t magic, nfat_arch;
|
int32_t magic, nfat_arch;
|
||||||
} mach_fat_header;
|
} mach_fat_header;
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t cputype, cpusubtype, offset, size, align;
|
int32_t cputype, cpusubtype, offset, size, align;
|
||||||
} mach_fat_arch;
|
} mach_fat_arch;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct {
|
struct {
|
||||||
@@ -501,6 +514,18 @@ typedef struct {
|
|||||||
mach_nlist sym_entry;
|
mach_nlist sym_entry;
|
||||||
uint8_t space[4096];
|
uint8_t space[4096];
|
||||||
} mach_fat_obj;
|
} 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 symname = '_'..LJBC_PREFIX..ctx.modname
|
||||||
local isfat, is64, align, mobj = false, false, 4, "mach_obj"
|
local isfat, is64, align, mobj = false, false, 4, "mach_obj"
|
||||||
@@ -509,7 +534,7 @@ typedef struct {
|
|||||||
elseif ctx.arch == "arm" then
|
elseif ctx.arch == "arm" then
|
||||||
isfat, mobj = true, "mach_fat_obj"
|
isfat, mobj = true, "mach_fat_obj"
|
||||||
elseif ctx.arch == "arm64" then
|
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
|
else
|
||||||
check(ctx.arch == "x86", "unsupported architecture for OSX")
|
check(ctx.arch == "x86", "unsupported architecture for OSX")
|
||||||
end
|
end
|
||||||
@@ -592,13 +617,13 @@ end
|
|||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
local function bclist(input, output)
|
local function bclist(ctx, input, output)
|
||||||
local f = readfile(input)
|
local f = readfile(ctx, input)
|
||||||
require("jit.bc").dump(f, savefile(output, "w"), true)
|
require("jit.bc").dump(f, savefile(output, "w"), true)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function bcsave(ctx, input, output)
|
local function bcsave(ctx, input, output)
|
||||||
local f = readfile(input)
|
local f = readfile(ctx, input)
|
||||||
local s = string.dump(f, ctx.strip)
|
local s = string.dump(f, ctx.strip)
|
||||||
local t = ctx.type
|
local t = ctx.type
|
||||||
if not t then
|
if not t then
|
||||||
@@ -651,6 +676,8 @@ local function docmd(...)
|
|||||||
ctx.arch = checkarg(tremove(arg, n), map_arch, "architecture")
|
ctx.arch = checkarg(tremove(arg, n), map_arch, "architecture")
|
||||||
elseif opt == "o" then
|
elseif opt == "o" then
|
||||||
ctx.os = checkarg(tremove(arg, n), map_os, "OS name")
|
ctx.os = checkarg(tremove(arg, n), map_os, "OS name")
|
||||||
|
elseif opt == "F" then
|
||||||
|
ctx.filename = "@"..tremove(arg, n)
|
||||||
else
|
else
|
||||||
usage()
|
usage()
|
||||||
end
|
end
|
||||||
@@ -662,7 +689,7 @@ local function docmd(...)
|
|||||||
end
|
end
|
||||||
if list then
|
if list then
|
||||||
if #arg == 0 or #arg > 2 then usage() end
|
if #arg == 0 or #arg > 2 then usage() end
|
||||||
bclist(arg[1], arg[2] or "-")
|
bclist(ctx, arg[1], arg[2] or "-")
|
||||||
else
|
else
|
||||||
if #arg ~= 2 then usage() end
|
if #arg ~= 2 then usage() end
|
||||||
bcsave(ctx, arg[1], arg[2])
|
bcsave(ctx, arg[1], arg[2])
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT ARM disassembler module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT ARM64 disassembler module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
--
|
--
|
||||||
-- Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com.
|
-- Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com.
|
||||||
@@ -107,24 +107,20 @@ local map_logsr = { -- Logical, shifted register.
|
|||||||
[0] = {
|
[0] = {
|
||||||
shift = 29, mask = 3,
|
shift = 29, mask = 3,
|
||||||
[0] = {
|
[0] = {
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg",
|
[0] = "andDNMSg", "bicDNMSg"
|
||||||
"andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] ="orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg",
|
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg"
|
||||||
"orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg",
|
[0] = "eorDNMSg", "eonDNMSg"
|
||||||
"eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg",
|
[0] = "ands|tstD0NMSg", "bicsDNMSg"
|
||||||
"ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
false -- unallocated
|
false -- unallocated
|
||||||
@@ -132,24 +128,20 @@ local map_logsr = { -- Logical, shifted register.
|
|||||||
{
|
{
|
||||||
shift = 29, mask = 3,
|
shift = 29, mask = 3,
|
||||||
[0] = {
|
[0] = {
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg",
|
[0] = "andDNMSg", "bicDNMSg"
|
||||||
"andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg",
|
[0] = "orr|movDN0MSg", "orn|mvnDN0MSg"
|
||||||
"orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg",
|
[0] = "eorDNMSg", "eonDNMSg"
|
||||||
"eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
shift = 21, mask = 7,
|
shift = 21, mask = 1,
|
||||||
[0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg",
|
[0] = "ands|tstD0NMSg", "bicsDNMSg"
|
||||||
"ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -735,7 +727,7 @@ local map_cond = {
|
|||||||
"hi", "ls", "ge", "lt", "gt", "le", "al",
|
"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 = {
|
local map_extend = {
|
||||||
[0] = "uxtb", "uxth", "uxtw", "uxtx", "sxtb", "sxth", "sxtw", "sxtx",
|
[0] = "uxtb", "uxth", "uxtw", "uxtx", "sxtb", "sxth", "sxtw", "sxtx",
|
||||||
@@ -956,7 +948,7 @@ local function disass_ins(ctx)
|
|||||||
elseif p == "U" then
|
elseif p == "U" then
|
||||||
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
||||||
local sz = band(rshift(op, 30), 3)
|
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
|
if imm12 ~= 0 then
|
||||||
x = "["..rn..", #"..imm12.."]"
|
x = "["..rn..", #"..imm12.."]"
|
||||||
else
|
else
|
||||||
@@ -993,8 +985,7 @@ local function disass_ins(ctx)
|
|||||||
x = x.."]"
|
x = x.."]"
|
||||||
end
|
end
|
||||||
elseif p == "P" then
|
elseif p == "P" then
|
||||||
local opcv, sh = rshift(op, 26), 2
|
local sh = 2 + rshift(op, 31 - band(rshift(op, 26), 1))
|
||||||
if opcv >= 0x2a then sh = 4 elseif opcv >= 0x1b then sh = 3 end
|
|
||||||
local imm7 = lshift(arshift(lshift(op, 10), 25), sh)
|
local imm7 = lshift(arshift(lshift(op, 10), 25), sh)
|
||||||
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
local rn = map_regs.x[band(rshift(op, 5), 31)]
|
||||||
local ind = band(rshift(op, 23), 3)
|
local ind = band(rshift(op, 23), 3)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT ARM64BE disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- ARM64 instructions are always little-endian. So just forward to the
|
-- ARM64 instructions are always little-endian. So just forward to the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS disassembler module.
|
-- 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
|
-- 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.
|
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS64 disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the big-endian functions from the
|
-- This module just exports the big-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS64EL disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the little-endian functions from the
|
-- This module just exports the little-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS64R6 disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the r6 big-endian functions from the
|
-- This module just exports the r6 big-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPS64R6EL disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the r6 little-endian functions from the
|
-- This module just exports the r6 little-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT MIPSEL disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the little-endian functions from the
|
-- This module just exports the little-endian functions from the
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT PPC disassembler module.
|
-- 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
|
-- 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.
|
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT x64 disassembler wrapper module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This module just exports the 64 bit functions from the combined
|
-- This module just exports the 64 bit functions from the combined
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT x86/x64 disassembler module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- This is a helper module used by the LuaJIT machine code dumper module.
|
-- This is a helper module used by the LuaJIT machine code dumper module.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT compiler dump module.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -55,7 +55,6 @@
|
|||||||
|
|
||||||
-- Cache some library functions and objects.
|
-- Cache some library functions and objects.
|
||||||
local jit = require("jit")
|
local jit = require("jit")
|
||||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
|
||||||
local jutil = require("jit.util")
|
local jutil = require("jit.util")
|
||||||
local vmdef = require("jit.vmdef")
|
local vmdef = require("jit.vmdef")
|
||||||
local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc
|
local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
-- LuaJIT profiler.
|
-- 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
|
-- Released under the MIT license. See Copyright Notice in luajit.h
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -41,7 +41,6 @@
|
|||||||
|
|
||||||
-- Cache some library functions and objects.
|
-- Cache some library functions and objects.
|
||||||
local jit = require("jit")
|
local jit = require("jit")
|
||||||
assert(jit.version_num == 20100, "LuaJIT core/library version mismatch")
|
|
||||||
local profile = require("jit.profile")
|
local profile = require("jit.profile")
|
||||||
local vmdef = require("jit.vmdef")
|
local vmdef = require("jit.vmdef")
|
||||||
local math = math
|
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