Merge tag 'Ghidra_12.1.4_build' into stable

This commit is contained in:
Ryan Kurtz
2026-09-21 12:55:40 -04:00
47 changed files with 7509 additions and 4186 deletions
@@ -1,3 +1,25 @@
# Ghidra 12.1.4 Change History (September 2026)
### Improvements
* _Analysis_. The Swift Demangler Analyzer now requires the `GHIDRA_SWIFT_DEMANGLER` environment variable to be set to the full path of the native Swift demangler binary, if Ghidra cannot find it in a known location. (GP-7238)
* _Basic Infrastructure_. Upgraded Apache commons-collections4 to 4.6.0. (GP-7171)
* _Demangler_. The native Swift demangler is now called with `--` to specify where the command options (flags) end and the mangled string begins. (GP-7172)
* _Importer_. Prevented Ghidra from loading libraries when binaries specified their location with a UNC path. (GP-7176)
### Bugs
* _Basic Infrastructure_. Fixed a potential `DomainObjectLockedException`. (GP-7190)
* _Data Types_. `DialogResourceDataType` now correctly defines `DLGITEMTEMPLATE.id` as `DWORD`. (GP-7157, Issue #9500, #9501)
* _Importer_. Fixed a potential stack overflow in the `OmfLoader`. (GP-7173)
* _Importer:PE_. Fixed a potential stack overflow in the `PeLoader`. (GP-7205)
* _Processors_. Corrected semantics for SuperH `shad` and `shld` instructions. (GP-6698)
* _Processors_. Corrected AARCH64 load/store addressing operand formatting when shift is set but omitted. (GP-6951, Issue #9042, #9082, #9515)
* _Processors_. Fixed issue with x86 where a handful of instructions were not zeroing out the upper word of 64-bit registers when writing to 32-bit partial registers. (GP-7027, Issue #9325)
* _Processors_. Corrected disassembly for NDS32 `fdiv` and `fmul` instructions. (GP-7041, Issue #9345)
* _Processors_. Corrected the calculation in x86 for 64-bit RIP-relative addressing. (GP-7052, Issue #6553)
* _Processors_. Completed major revision to Hexagon processor module to correct: 1) inconsistent specification of reserved/don't-care instruction bits, 2) support for paired-vector swap mode, 3) unimplemented pcode, 4) missing instructions up to Hexagon V79. Quad-vector instructions have not yet been implemented. (GP-7110)
* _Processors_. A large number of Hexagon p-code fixes were made. (GP-7267, Issue #9163)
* _Scripting_. Fixed an issue that resulted in the cause of GhidraScript compilation errors to be hidden from the user. (GP-7265, Issue #9551)
# Ghidra 12.1.3 Change History (August 2026)
### Improvements
@@ -132,11 +132,10 @@ public class NumericAnalysesTest extends AbstractLisaTest {
lisaOptions.setHighPcode(true);
runTest();
equalsAssert(valueOf("0040000a:2:register:00000000"), null);
equalsAssert(valueOf("00400011:142:register:00000000"), "[-Inf, +Inf]");
equalsAssert(valueOf("00400011:148:register:00000000"), "[-Inf, +Inf]");
equalsAssert(valueOf("0040001c:26:register:00000000"), "[-Inf, -3]");
equalsAssert(valueOf("00400011:142:register:00000000"), "[-Inf, +Inf]");
equalsAssert(valueOf("00400020:111:register:00000000"), "[3, +Inf]");
equalsAssert(valueOf("00400022:115:register:00000000"), "[3, 8]");
equalsAssert(valueOf("00400020:117:register:00000000"), "[3, +Inf]");
equalsAssert(valueOf("00400022:121:register:00000000"), "[3, 8]");
equalsAssert(valueOf("00400026:29:register:00000000"), "[-Inf, 39]");
equalsAssert(valueOf("0040002a:38:register:00000000"), "[-Inf, +Inf]");
}
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import static ghidra.framework.main.DataTreeDialogType.*;
import java.io.IOException;
@@ -20,8 +21,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import javax.swing.SwingUtilities;
import java.util.concurrent.atomic.AtomicReference;
import db.*;
import db.buffers.BufferFile;
@@ -30,7 +30,8 @@ import ghidra.app.script.ImproperUseException;
import ghidra.framework.data.GhidraFile;
import ghidra.framework.data.GhidraFileData;
import ghidra.framework.main.DataTreeDialog;
import ghidra.framework.model.*;
import ghidra.framework.model.DefaultDomainFileFilter;
import ghidra.framework.model.DomainFile;
import ghidra.framework.store.FolderItem;
import ghidra.framework.store.local.LocalDatabaseItem;
import ghidra.program.model.lang.LanguageDescription;
@@ -38,6 +39,7 @@ import ghidra.program.model.lang.LanguageID;
import ghidra.program.model.listing.Program;
import ghidra.program.util.DefaultLanguageService;
import ghidra.util.Msg;
import ghidra.util.Swing;
import ghidra.util.exception.CancelledException;
import ghidra.util.task.TaskMonitor;
@@ -138,28 +140,30 @@ public class FixLangId extends GhidraScript {
}
public DomainFile askProgramFile(String title) {
final DomainFile[] domainFile = new DomainFile[] { null };
// The file filter employed restricts selection to a program file within the active
// project where we have the ability to update file data.
final DataTreeDialog dtd =
new DataTreeDialog(null, title, OPEN, new DefaultDomainFileFilter(Program.class, true));
dtd.addOkActionListener(e -> {
dtd.close();
domainFile[0] = dtd.getDomainFile();
AtomicReference<DomainFile> ref = new AtomicReference<>();
Swing.runNow(() -> {
// The file filter employed restricts selection to a program file within the active
// project where we have the ability to update file data.
DefaultDomainFileFilter filter = new DefaultDomainFileFilter(Program.class, true);
DataTreeDialog dtd = new DataTreeDialog(null, title, OPEN, filter);
dtd.addOkActionListener(e -> {
dtd.close();
ref.set(dtd.getDomainFile());
});
dtd.showComponent();
});
try {
SwingUtilities.invokeAndWait(() -> dtd.showComponent());
}
catch (Exception e) {
return null;
}
if (domainFile[0] != null &&
!Program.class.isAssignableFrom(domainFile[0].getDomainObjectClass())) {
DomainFile domainFile = ref.get();
if (domainFile != null &&
!Program.class.isAssignableFrom(domainFile.getDomainObjectClass())) {
Msg.showError(getClass(), null, "Script Error",
"Selected project file is not a program file!");
return null;
}
return domainFile[0];
return domainFile;
}
public static Object getInstanceField(String fieldName, Object ownerInstance)
@@ -838,11 +838,12 @@ public class GhidraSourceBundle extends GhidraBundle {
for (Diagnostic<? extends JavaFileObject> diagnostic : diagnostics.getDiagnostics()) {
String error = diagnostic.toString() + "\n";
writer.write(error);
ResourceFileJavaFileObject sourceFileObject =
(ResourceFileJavaFileObject) diagnostic.getSource();
ResourceFile sourceFile = sourceFileObject.getFile();
buildError(sourceFile, error); // remember all errors for this file
filesWithErrors.add(sourceFileObject);
JavaFileObject obj = diagnostic.getSource();
if (obj instanceof ResourceFileJavaFileObject sourceFileObject) {
ResourceFile sourceFile = sourceFileObject.getFile();
buildError(sourceFile, error); // remember all errors for this file
filesWithErrors.add(sourceFileObject);
}
}
for (ResourceFileJavaFileObject sourceFileObject : filesWithErrors) {
if (sourceFiles.remove(sourceFileObject)) {
@@ -18,8 +18,7 @@ package ghidra.app.util.bin.format.macho.commands;
import java.io.IOException;
import ghidra.app.util.bin.BinaryReader;
import ghidra.app.util.bin.format.macho.MachConstants;
import ghidra.app.util.bin.format.macho.MachHeader;
import ghidra.app.util.bin.format.macho.*;
import ghidra.app.util.bin.format.macho.commands.dyld.*;
import ghidra.app.util.importer.MessageLog;
import ghidra.program.flatapi.FlatProgramAPI;
@@ -61,9 +60,10 @@ public class DyldInfoCommand extends LoadCommand {
* references. Note that this might be in a different underlying provider.
* @param header The {@link MachHeader header} associated with this load command
* @throws IOException if an IO-related error occurs while parsing
* @throws MachException if the {@link DyldInfoCommand} is invalid
*/
DyldInfoCommand(BinaryReader loadCommandReader, BinaryReader dataReader, MachHeader header)
throws IOException {
throws IOException, MachException {
super(loadCommandReader);
rebaseOff = loadCommandReader.readNextUnsignedInt();
@@ -22,6 +22,7 @@ import java.util.ArrayList;
import java.util.List;
import ghidra.app.util.bin.BinaryReader;
import ghidra.app.util.bin.format.macho.MachException;
import ghidra.app.util.bin.format.macho.MachHeader;
import ghidra.app.util.bin.format.macho.commands.DyldInfoCommandConstants;
import ghidra.program.model.data.LEB128;
@@ -31,10 +32,11 @@ import ghidra.program.model.data.LEB128;
*/
public class BindingTable extends OpcodeTable {
private static final int COUNT_LIMIT = 100_000;
private List<Binding> bindings = new ArrayList<>();
private List<Binding> threadedBindings;
/**
* Creates an empty {@link BindingTable}
*/
@@ -50,9 +52,10 @@ public class BindingTable extends OpcodeTable {
* @param tableSize The size of the table, in bytes
* @param lazy True if this is a lazy binding table; otherwise, false
* @throws IOException if an IO-related error occurs while parsing
* @throws MachException if the {@link BindingTable} is invalid
*/
public BindingTable(BinaryReader reader, MachHeader header, long tableSize, boolean lazy)
throws IOException {
throws IOException, MachException {
this();
int pointerSize = header.getAddressSize();
@@ -143,6 +146,10 @@ public class BindingTable extends OpcodeTable {
case BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB: { // 0xC0
ulebOffsets.add(reader.getPointerIndex() - origIndex);
long count = reader.readNext(LEB128::unsigned);
if (count < 0 || count > COUNT_LIMIT) {
throw new MachException("BIND_OPCODE count exceeds limit (%d): %d"
.formatted(COUNT_LIMIT, count));
}
ulebOffsets.add(reader.getPointerIndex() - origIndex);
long skip = reader.readNext(LEB128::unsigned);
for ( int i = 0 ; i < count ; ++i ) {
@@ -22,6 +22,7 @@ import java.util.ArrayList;
import java.util.List;
import ghidra.app.util.bin.BinaryReader;
import ghidra.app.util.bin.format.macho.MachException;
import ghidra.app.util.bin.format.macho.MachHeader;
import ghidra.program.model.data.LEB128;
@@ -30,6 +31,8 @@ import ghidra.program.model.data.LEB128;
*/
public class RebaseTable extends OpcodeTable {
private static final int COUNT_LIMIT = 100_000;
private List<Rebase> rebases = new ArrayList<>();
/**
@@ -46,8 +49,10 @@ public class RebaseTable extends OpcodeTable {
* @param header The header
* @param tableSize The size of the table, in bytes
* @throws IOException if an IO-related error occurs while parsing
* @throws MachException if the {@link RebaseTable} is invalid
*/
public RebaseTable(BinaryReader reader, MachHeader header, long tableSize) throws IOException {
public RebaseTable(BinaryReader reader, MachHeader header, long tableSize)
throws IOException, MachException {
this();
int pointerSize = header.getAddressSize();
@@ -94,6 +99,10 @@ public class RebaseTable extends OpcodeTable {
case REBASE_OPCODE_DO_REBASE_ULEB_TIMES: { // 0x60
ulebOffsets.add(reader.getPointerIndex() - origIndex);
int count = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
if (count < 0 || count > COUNT_LIMIT) {
throw new MachException("REBASE_OPCODE count exceeds limit (%d): %d"
.formatted(COUNT_LIMIT, count));
}
for (int i = 0; i < count; ++i) {
rebases.add(new Rebase(rebase));
rebase.segmentOffset += pointerSize;
@@ -109,6 +118,10 @@ public class RebaseTable extends OpcodeTable {
case REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB: { // 0x80
ulebOffsets.add(reader.getPointerIndex() - origIndex);
int count = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
if (count < 0 || count > COUNT_LIMIT) {
throw new MachException("REBASE_OPCODE count exceeds limit (%d): %d"
.formatted(COUNT_LIMIT, count));
}
ulebOffsets.add(reader.getPointerIndex() - origIndex);
int skip = reader.readNextUnsignedVarIntExact(LEB128::unsigned);
for (int i = 0; i < count; ++i) {
@@ -40,7 +40,7 @@ public class OmfIteratedData extends OmfData {
dataOffset = OmfUtils.readInt2Or4(dataReader, hasBigFields);
ArrayList<DataBlock> blocklist = new ArrayList<>();
while (dataReader.getPointerIndex() < dataEnd) {
DataBlock block = DataBlock.read(dataReader, hasBigFields);
DataBlock block = DataBlock.read(dataReader, hasBigFields, 0);
blocklist.add(block);
}
datablock = new DataBlock[blocklist.size()];
@@ -84,12 +84,19 @@ public class OmfIteratedData extends OmfData {
* Contain the definition of one part of a datablock with possible recursion
*/
public static class DataBlock {
private static final int DEPTH_LIMIT = 100;
private int repeatCount;
private int blockCount;
private byte[] simpleBlock = null;
private DataBlock[] nestedBlock = null;
public static DataBlock read(BinaryReader reader, boolean hasBigFields) throws IOException {
public static DataBlock read(BinaryReader reader, boolean hasBigFields, int depth)
throws IOException {
if (depth > DEPTH_LIMIT) {
throw new IOException("DataBlock read exceeded depth limit: " + DEPTH_LIMIT);
}
DataBlock subblock = new DataBlock();
subblock.repeatCount = (int) OmfUtils.readInt2Or4(reader, hasBigFields).value();
if (subblock.repeatCount < 0) {
@@ -106,7 +113,7 @@ public class OmfIteratedData extends OmfData {
else {
subblock.nestedBlock = new DataBlock[subblock.blockCount];
for (int i = 0; i < subblock.blockCount; ++i) {
subblock.nestedBlock[i] = read(reader, hasBigFields); // Recursive definition
subblock.nestedBlock[i] = read(reader, hasBigFields, depth + 1); // Recursive definition
}
}
return subblock;
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,6 +16,8 @@
package ghidra.app.util.bin.format.pe;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
import ghidra.app.util.bin.BinaryReader;
import ghidra.app.util.bin.StructConverter;
@@ -158,6 +160,15 @@ class PEx64UnwindInfo implements StructConverter {
static PEx64UnwindInfo readUnwindInfo(BinaryReader reader, long offset, NTHeader ntHeader)
throws IOException {
return readUnwindInfo(reader, offset, ntHeader, new HashSet<>());
}
private static PEx64UnwindInfo readUnwindInfo(BinaryReader reader, long offset,
NTHeader ntHeader, Set<Long> visitedOffsets) throws IOException {
if (!visitedOffsets.add(offset)) {
throw new IOException("Cyclic unwind info chain");
}
long origIndex = reader.getPointerIndex();
long pointer = ntHeader.rvaToPointer(offset);
@@ -205,7 +216,8 @@ class PEx64UnwindInfo implements StructConverter {
// Follow the chain to the referenced UNWIND_INFO structure until we
// get to the end
PEx64UnwindInfo info = readUnwindInfo(reader, unwindInfoAddressOrData, ntHeader);
PEx64UnwindInfo info =
readUnwindInfo(reader, unwindInfoAddressOrData, ntHeader, visitedOffsets);
unwindInfo.unwindHandlerChainInfo = new ImageRuntimeFunctionEntry_X86(beginAddress,
endAddress, unwindInfoAddressOrData, info);
}
@@ -911,8 +911,16 @@ public class HeadlessAnalyzer {
// GhidraScriptProvider case
GhidraScriptProvider provider = GhidraScriptUtil.getProvider(currScriptFile);
PrintWriter errWriter = new PrintWriter(System.err);
currScript = provider.getScriptInstance(currScriptFile, errWriter);
StringWriter stringWriter = new StringWriter();
PrintWriter errorWriter = new PrintWriter(stringWriter);
try {
currScript = provider.getScriptInstance(currScriptFile, errorWriter);
}
catch (GhidraScriptLoadException e) {
errorWriter.flush();
Msg.error(this, stringWriter.toString());
throw e;
}
currScript.setScriptArgs(scriptArgs);
if (options.propertiesFilePaths.size() > 0) {
@@ -841,6 +841,15 @@ public abstract class AbstractLibrarySupportLoader extends AbstractProgramLoader
}
if (results.isEmpty() && isAbsoluteLibraryPath(library)) {
if (library.startsWith("\\\\")) {
log.appendMsg("Skipping library '%s' with UNC path".formatted(library));
return results;
}
if (library.chars().anyMatch(Character::isISOControl)) {
log.appendMsg("Skipping library '%s' that contains control characters"
.formatted(library));
return results;
}
LocalFileSystem localFS = FileSystemService.getInstance().getLocalFS();
GFile file = lookupLibraryInFs(library, localFS);
Optional.ofNullable(file).ifPresent(results::add);
@@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,17 +21,16 @@ import java.util.List;
import ghidra.app.util.bin.BinaryReader;
import ghidra.app.util.bin.StructConverter;
import ghidra.program.model.data.DataType;
import ghidra.program.model.data.Structure;
import ghidra.program.model.data.StructureDataType;
import ghidra.program.model.data.*;
import ghidra.util.exception.DuplicateNameException;
/**
* Class to represent the Android boot loader header.
*
*/
public class AndroidBootLoaderHeader implements StructConverter {
private static final int NUM_IMAGES_LIMIT = 50_000;
private String magic;
private int numberOfImages;
private int startOffset;
@@ -42,6 +41,10 @@ public class AndroidBootLoaderHeader implements StructConverter {
public AndroidBootLoaderHeader(BinaryReader reader) throws IOException {
magic = reader.readNextAsciiString(AndroidBootLoaderConstants.BOOTLDR_MAGIC_SIZE);
numberOfImages = reader.readNextInt();
if (numberOfImages < 0 || numberOfImages > NUM_IMAGES_LIMIT) {
throw new IOException("Image count exceeds limit (%d): %d"
.formatted(NUM_IMAGES_LIMIT, numberOfImages));
}
startOffset = reader.readNextInt();
bootLoaderSize = reader.readNextInt();
for (int i = 0; i < numberOfImages; ++i) {
@@ -66,7 +69,7 @@ public class AndroidBootLoaderHeader implements StructConverter {
}
public List<AndroidBootLoaderImageInfo> getImageInfoList() {
return new ArrayList<AndroidBootLoaderImageInfo>(imageInfoList);
return new ArrayList<>(imageInfoList);
}
@Override
+5 -1
View File
@@ -21,4 +21,8 @@ protocol descriptor for SwiftUI.View
The resulting tree is parsed by the Ghidra Swift Demangler to form and apply a demangled symbol
name.
The `Demangler Swift` Analyzer assumes that the native Swift Demangler is on the `PATH`.
The `Demangler Swift` Analyzer looks for the path to the native Swift Demangler binary
in the `GHIDRA_SWIFT_DEMANGLER` environment variable. If that environment variable is not set, the
following paths will be tried on non-Windows platforms:
* `/usr/bin/swift-demangle`
* `/usr/bin/swift`
@@ -35,7 +35,9 @@ public class SwiftDemanglerAnalyzer extends AbstractDemanglerAnalyzer {
private static final String NAME = "Demangler Swift";
private static final String DESCRIPTION =
"Demangles Swift symbols and applies appropriate datatype and calling conventions where possible. Requires Swift to be on the PATH.";
"Demangles Swift symbols and applies appropriate datatype and calling conventions where " +
"possible. Requires native Swift demangler to be on system in known location or " +
"pointed to by the GHIDRA_SWIFT_DEMANGLER environment variable.";
private static final String OPTION_NAME_INCOMPLETE_PREFIX =
"Use incomplete demangle label prefix (%s)"
@@ -105,7 +107,8 @@ public class SwiftDemanglerAnalyzer extends AbstractDemanglerAnalyzer {
catch (IOException e) {
log.appendMsg(e.getMessage());
log.appendMsg("You must have Swift installed to demangle Swift symbols.\n" +
"See the \"Demangler Swift\" analyzer options to configure.");
" * If installed but not found, set the GHIDRA_SWIFT_DEMANGLER environment\n" +
" variable to the full path of the native Swift demangler (swift/swift-demangle)");
}
}
return false;
@@ -20,6 +20,11 @@ import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils;
import ghidra.framework.Application;
import ghidra.framework.OperatingSystem;
/**
* A class used to launch the Swift native demangler.
* <p>
@@ -34,7 +39,7 @@ import java.util.stream.Collectors;
*/
public class SwiftNativeDemangler {
private String nativeDemanglerCmd;
private String nativeDemanglerPath;
private boolean standaloneDemanglerBinary;
/**
@@ -57,18 +62,25 @@ public class SwiftNativeDemangler {
* @throws IOException if there was a problem finding or running the Swift native demangler
*/
public SwiftNativeDemangler() throws IOException {
List<String> demanglerNames = List.of("swift-demangle", "swift");
List<String> demanglerPaths = new ArrayList<>();
String envVar = System.getenv("GHIDRA_SWIFT_DEMANGLER");
if (StringUtils.isNotBlank(envVar)) {
demanglerPaths.add(envVar);
}
if (OperatingSystem.CURRENT_OPERATING_SYSTEM != OperatingSystem.WINDOWS) {
demanglerPaths.add("/usr/bin/swift-demangle");
demanglerPaths.add("/usr/bin/swift");
}
IOException ioe = null;
for (String demanglerName : demanglerNames) {
nativeDemanglerCmd = demanglerName; // expect swift demangler to be on the PATH
for (String path : demanglerPaths) {
try {
int exitCode =
new ProcessBuilder(List.of(nativeDemanglerCmd, "--version")).start().waitFor();
Process p = new ProcessBuilder(List.of(path, "--version")).start();
int exitCode = p.waitFor();
if (exitCode == 0) {
ioe = null;
standaloneDemanglerBinary =
new File(nativeDemanglerCmd).getName().contains("-demangle");
break;
nativeDemanglerPath = path;
standaloneDemanglerBinary = new File(path).getName().contains("-demangle");
return;
}
ioe = new IOException("Native Swift demangler exited with code: " + exitCode);
}
@@ -79,9 +91,10 @@ public class SwiftNativeDemangler {
ioe = new IOException(e);
}
}
if (ioe != null) {
throw ioe;
if (ioe == null) {
ioe = new IOException("Native Swift demangler not found.");
}
throw ioe;
}
/**
@@ -139,13 +152,15 @@ public class SwiftNativeDemangler {
*/
private BufferedReader demangle(String mangled, List<String> options) throws IOException {
List<String> command = new ArrayList<>();
command.add(nativeDemanglerCmd);
command.add(nativeDemanglerPath);
if (!standaloneDemanglerBinary) {
command.add("demangle");
}
command.addAll(options);
command.add("--"); // indicate end of flags
command.add(mangled);
Process p = new ProcessBuilder(command).redirectErrorStream(true).start();
File dir = Application.getInstallationDirectory().getFile(false);
Process p = new ProcessBuilder(command).redirectErrorStream(true).directory(dir).start();
return new BufferedReader(new InputStreamReader(p.getInputStream()));
}
}
+1 -1
View File
@@ -5,7 +5,7 @@ MODULE FILE LICENSE: lib/failureaccess-1.0.1.jar Apache License 2.0
MODULE FILE LICENSE: lib/jdom2-2.0.6.1.jar JDOM License
MODULE FILE LICENSE: lib/log4j-api-2.26.1.jar Apache License 2.0
MODULE FILE LICENSE: lib/log4j-core-2.26.1.jar Apache License 2.0
MODULE FILE LICENSE: lib/commons-collections4-4.1.jar Apache License 2.0
MODULE FILE LICENSE: lib/commons-collections4-4.6.0.jar Apache License 2.0
MODULE FILE LICENSE: lib/commons-lang3-3.20.0.jar Apache License 2.0
MODULE FILE LICENSE: lib/commons-io-2.19.0.jar Apache License 2.0
MODULE FILE LICENSE: lib/commons-text-1.10.0.jar Apache License 2.0
+1 -1
View File
@@ -36,7 +36,7 @@ dependencies {
api "org.jdom:jdom2:2.0.6.1"
api "org.apache.logging.log4j:log4j-api:2.26.1"
api "org.apache.logging.log4j:log4j-core:2.26.1"
api "org.apache.commons:commons-collections4:4.1"
api "org.apache.commons:commons-collections4:4.6.0"
api "org.apache.commons:commons-compress:1.27.1" // requires commons-codec
api "commons-codec:commons-codec:1.18.0"
api "org.apache.commons:commons-lang3:3.20.0"
@@ -319,13 +319,13 @@ public abstract class AbstractSwingUpdateManager {
// if past maximum delay, always do work
long timeSinceBufferingStart = now - bufferingStartTime;
if (timeSinceBufferingStart > maxDelay) {
if (timeSinceBufferingStart >= maxDelay) {
return true;
}
// if no new requests have come in since the last time we checked, do work
long timeSinceLastRequest = now - requestTime;
if (timeSinceLastRequest > minDelay) {
if (timeSinceLastRequest >= minDelay) {
return true;
}
@@ -66,14 +66,24 @@ abstract class AbstractTransactionManager {
lockReason = reason;
++lockCount;
}
if (doPrepare) {
for (DomainObjectAdapterDB domainObj : getDomainObjects()) {
if (domainObj.isChanged()) {
domainObj.prepareToSave();
boolean success = false;
try {
if (doPrepare) {
for (DomainObjectAdapterDB domainObj : getDomainObjects()) {
if (domainObj.isChanged()) {
domainObj.prepareToSave();
}
}
}
success = true;
return true;
}
finally {
if (!success) {
--lockCount;
}
}
return true;
}
/**
@@ -152,7 +162,10 @@ abstract class AbstractTransactionManager {
}
/**
* Release the modification lock which is associated with the specified LockingTaskHandler.
* Release the modification lock which is associated with the specified
* {@link LockingTaskMonitor handler}.
*
* @param handler The {@link LockingTaskMonitor handler}
*/
final synchronized void unlock(LockingTaskMonitor handler) {
if (handler == null) {
@@ -340,7 +340,7 @@ public class DialogResourceDataType extends DynamicDataType {
struct.add(ShortDataType.dataType, "y", "y-coordinate of upper-left corner of control");
struct.add(ShortDataType.dataType, "cx", "width of control");
struct.add(ShortDataType.dataType, "cy", "height of control");
struct.add(DWordDataType.dataType, "id", "control identifier");
struct.add(WordDataType.dataType, "id", "control identifier");
return struct;
}
@@ -6355,7 +6355,7 @@ is sf=0 & op=1 & S=1 & b_2428=0xb & opt=0 & b_2121=1 & ExtendRegShift32 & Rn_GPR
# AUNIT --inst xeb000000/mask=xffc00000 --status pass --comment "flags"
:subs Rd_GPR64, Rn_GPR64xsp, ExtendRegShift64
is sf=1 & op=1 & S=1 & b_2428=0xb & opt=0 & ExtendRegShift64 & Rn_GPR64xsp & Rd_GPR64
is sf=1 & op=1 & S=1 & b_2428=0xb & opt=0 & b_2121=1 & ExtendRegShift64 & Rn_GPR64xsp & Rd_GPR64
{
tmp_2:8 = ExtendRegShift64;
subflags(Rn_GPR64xsp, tmp_2);
@@ -2190,17 +2190,19 @@ RegShiftVal64: "" is aa_extreg_imm3=0 { export 0:8; }
LSL_Sp_Special64: Rm_GPR64, "LSL " is Rm_GPR64 & aa_extreg_imm3 { export Rm_GPR64; }
LSL_Sp_Special64: Rm_GPR64 is Rm_GPR64 & aa_extreg_imm3=0 { export Rm_GPR64; }
ExtendReg64: Rm_GPR32, "UXTB " is Rm_GPR32 & b_2121=1 & aa_extreg_option=0 { tmp0:4 = Rm_GPR32; tmp:8 = zext(tmp0:1); export tmp; }
ExtendReg64: Rm_GPR32, "UXTH " is Rm_GPR32 & b_2121=1 & aa_extreg_option=1 { tmp0:4 = Rm_GPR32; tmp:8 = zext(tmp0:2); export tmp; }
ExtendReg64: Rm_GPR32, "UXTW " is Rm_GPR32 & b_2121=1 & aa_extreg_option=2 { tmp:8 = zext(Rm_GPR32); export tmp; }
ExtendReg64: LSL_Sp_Special64 is Rm_GPR64 & b_2121=1 & aa_extreg_option=3 & b_29=1 & b_25=1 & (Rn=0x1f) & LSL_Sp_Special64 { tmp:8 = Rm_GPR64; export tmp; }
ExtendReg64: LSL_Sp_Special64 is Rm_GPR64 & b_2121=1 & aa_extreg_option=3 & b_29=0 & b_25=1 & (Rd=0x1f | Rn=0x1f) & LSL_Sp_Special64 { tmp:8 = Rm_GPR64; export tmp; }
ExtendReg64: Rm_GPR64, "LSL " is Rm_GPR64 & b_2121=1 & aa_extreg_option=3 & b_29 & b_25=0 { tmp:8 = Rm_GPR64; export tmp; }
ExtendReg64: Rm_GPR64, "UXTX " is Rm_GPR64 & b_2121=1 & aa_extreg_option=3 { tmp:8 = Rm_GPR64; export tmp; }
ExtendReg64: Rm_GPR32, "SXTB " is Rm_GPR32 & b_2121=1 & aa_extreg_option=4 { tmp0:4 = Rm_GPR32; tmp:8 = sext(tmp0:1); export tmp; }
ExtendReg64: Rm_GPR32, "SXTH " is Rm_GPR32 & b_2121=1 & aa_extreg_option=5 { tmp0:4 = Rm_GPR32; tmp:8 = sext(tmp0:2); export tmp; }
ExtendReg64: Rm_GPR32, "SXTW " is Rm_GPR32 & b_2121=1 & aa_extreg_option=6 { tmp:8 = sext(Rm_GPR32); export tmp; }
ExtendReg64: Rm_GPR64, "SXTX " is Rm_GPR64 & b_2121=1 & aa_extreg_option=7 { tmp:8 = Rm_GPR64; export tmp; }
ExtendReg64: Rm_GPR32, "UXTB " is Rm_GPR32 & aa_extreg_option=0 { tmp0:4 = Rm_GPR32; tmp:8 = zext(tmp0:1); export tmp; }
ExtendReg64: Rm_GPR32, "UXTH " is Rm_GPR32 & aa_extreg_option=1 { tmp0:4 = Rm_GPR32; tmp:8 = zext(tmp0:2); export tmp; }
ExtendReg64: Rm_GPR32, "UXTW " is Rm_GPR32 & aa_extreg_option=2 { tmp:8 = zext(Rm_GPR32); export tmp; }
ExtendReg64: LSL_Sp_Special64 is Rm_GPR64 & aa_extreg_option=3 & b_29=1 & b_25=1 & (Rn=0x1f) & LSL_Sp_Special64 { tmp:8 = Rm_GPR64; export tmp; }
ExtendReg64: LSL_Sp_Special64 is Rm_GPR64 & aa_extreg_option=3 & b_29=0 & b_25=1 & (Rd=0x1f | Rn=0x1f) & LSL_Sp_Special64 { tmp:8 = Rm_GPR64; export tmp; }
# These two are only used by load/store (register) instructions
ExtendReg64: Rm_GPR64, "LSL " is Rm_GPR64 & b_1212=1 & aa_extreg_option=3 & b_25=0 { tmp:8 = Rm_GPR64; export tmp; }
ExtendReg64: Rm_GPR64 is Rm_GPR64 & b_1212=0 & aa_extreg_option=3 & b_25=0 { tmp:8 = Rm_GPR64; export tmp; }
ExtendReg64: Rm_GPR64, "UXTX " is Rm_GPR64 & aa_extreg_option=3 { tmp:8 = Rm_GPR64; export tmp; }
ExtendReg64: Rm_GPR32, "SXTB " is Rm_GPR32 & aa_extreg_option=4 { tmp0:4 = Rm_GPR32; tmp:8 = sext(tmp0:1); export tmp; }
ExtendReg64: Rm_GPR32, "SXTH " is Rm_GPR32 & aa_extreg_option=5 { tmp0:4 = Rm_GPR32; tmp:8 = sext(tmp0:2); export tmp; }
ExtendReg64: Rm_GPR32, "SXTW " is Rm_GPR32 & aa_extreg_option=6 { tmp:8 = sext(Rm_GPR32); export tmp; }
ExtendReg64: Rm_GPR64, "SXTX " is Rm_GPR64 & aa_extreg_option=7 { tmp:8 = Rm_GPR64; export tmp; }
ExtendRegShift64: ExtendReg64^RegShiftVal64
is aa_extreg_shift = 0 & aa_extreg_option & aa_extreg_imm3 & ExtendReg64 & RegShiftVal64
@@ -1,4 +1,5 @@
##VERSION: 2.0
##MODULE IP: Apache License 2.0
Module.manifest||GHIDRA||||END|
data/languages/Hexagon.opinion||GHIDRA||||END|
data/languages/hexagon.cspec||GHIDRA||||END|
@@ -9,7 +10,7 @@ data/languages/hexagon.sinc||GHIDRA||||END|
data/languages/hexagon.slaspec||GHIDRA||||END|
data/languages/hexagon_float.sinc||GHIDRA||||END|
data/languages/hexagon_hvx.sinc||GHIDRA||||END|
data/languages/hexagon_hvx.txt||GHIDRA|exclude|||END|
data/languages/hexagon_hvx2.sinc||GHIDRA||||END|
data/languages/hexagon_left.sinc||GHIDRA||||END|
data/languages/hexagon_right.sinc||GHIDRA||||END|
data/patterns/Hexagon_patterns.xml||GHIDRA||||END|
@@ -5,7 +5,7 @@
endian="little"
size="32"
variant="default"
version="2.4"
version="2.5"
slafile="hexagon.sla"
processorspec="hexagon.pspec"
id="Hexagon:LE:32:default">
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1317,12 +1317,12 @@ define pcodeop fnmsubs;
}
define pcodeop fmuls;
:fmuls Fst, Fsa, Fsb is $(I32) & $(COP) & fop4=0xa & Fst & Fsa & Fsb & cop4=0x0 {
:fmuls Fst, Fsa, Fsb is $(I32) & $(COP) & fop4=0xc & Fst & Fsa & Fsb & cop4=0x0 {
Fst = fmuls(Fsa, Fsb);
}
define pcodeop fdivs;
:fdivs Fst, Fsa, Fsb is $(I32) & $(COP) & fop4=0xb & Fst & Fsa & Fsb & cop4=0x0 {
:fdivs Fst, Fsa, Fsb is $(I32) & $(COP) & fop4=0xd & Fst & Fsa & Fsb & cop4=0x0 {
Fst = fdivs(Fsa, Fsb);
}
@@ -1439,12 +1439,12 @@ define pcodeop fnmsubd;
}
define pcodeop fmuld;
:fmuld Fdt, Fda, Fdb is $(I32) & $(COP) & fop4=0xa & Fdt & Fda & Fdb & cop4=0x8 {
:fmuld Fdt, Fda, Fdb is $(I32) & $(COP) & fop4=0xc & Fdt & Fda & Fdb & cop4=0x8 {
Fdt = fmuld(Fda, Fdb);
}
define pcodeop fdivd;
:fdivd Fdt, Fda, Fdb is $(I32) & $(COP) & fop4=0xb & Fdt & Fda & Fdb & cop4=0x8 {
:fdivd Fdt, Fda, Fdb is $(I32) & $(COP) & fop4=0xd & Fdt & Fda & Fdb & cop4=0x8 {
Fdt = fdivd(Fda, Fdb);
}
@@ -1492,12 +1492,12 @@ MovMUReg2: MovMUReg2_15 is MovMUReg2_15 {
:shad rm_04_07, rn_08_11 is opcode_12_15=0b0100 & rn_08_11 & rm_04_07 & opcode_00_03=0b1100
{
if (rm_04_07 s> 0) goto <shift_left>;
if (rm_04_07 s<= -32) goto <shift_right_32>;
if ((rm_04_07 & 0x1f) == 0) goto <shift_right_32>;
# shift right
rn_08_11 = rn_08_11 s>> -rm_04_07;
rn_08_11 = rn_08_11 s>> ( ( ~rm_04_07 & 0x1f ) + 1 );
goto <end>;
<shift_left>
rn_08_11 = rn_08_11 << (rm_04_07 & 0x0000001F);
rn_08_11 = rn_08_11 << (rm_04_07 & 0x1f);
goto <end>;
<shift_right_32>
rn_08_11 = -1 * zext(rn_08_11 s< 0);
@@ -1526,10 +1526,10 @@ MovMUReg2: MovMUReg2_15 is MovMUReg2_15 {
if (rm_04_07 s> 0) goto <shift_left>;
if (rm_04_07 s<= -32) goto <shift_right_32>;
# shift right
rn_08_11 = rn_08_11 >> -rm_04_07;
rn_08_11 = rn_08_11 >> ( ( ~rm_04_07 & 0x1f ) + 1 );
goto <end>;
<shift_left>
rn_08_11 = rn_08_11 << (rm_04_07 & 0x0000001F);
rn_08_11 = rn_08_11 << (rm_04_07 & 0x1f);
goto <end>;
<shift_right_32>
rn_08_11 = 0;
+53 -34
View File
@@ -661,10 +661,10 @@ define pcodeop vcvtps2pd_avx ;
}
# CVTSD2SI 3-253 PAGE 823 LINE 44315
:VCVTSD2SI Reg32, XmmReg2_m64 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_F2) & $(VEX_0F) & $(VEX_W0); byte=0x2D; Reg32 ... & XmmReg2_m64
:VCVTSD2SI Reg32, XmmReg2_m64 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_F2) & $(VEX_0F) & $(VEX_W0); byte=0x2D; (Reg32 & check_Reg32_dest) ... & XmmReg2_m64
{
Reg32 = trunc(round(XmmReg2_m64[0,64]));
# TODO Reg64 = zext(Reg32)
build check_Reg32_dest;
}
# CVTSD2SI 3-253 PAGE 823 LINE 44317
@@ -998,11 +998,9 @@ define pcodeop vldmxcsr_avx ;
}
# MASKMOVDQU 4-8 PAGE 1128 LINE 59041
define pcodeop vmaskmovdqu_avx ;
:VMASKMOVDQU XmmReg1, XmmReg2 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F) & $(VEX_WIG); byte=0xF7; XmmReg1 & (mod=0x3 & XmmReg2)
:VMASKMOVDQU XmmReg1, XmmReg2 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F) & $(VEX_WIG); byte=0xF7; XmmReg1 & mod=0x3 & XmmReg2 & maskMovDI
{
vmaskmovdqu_avx( XmmReg1, XmmReg2 );
# TODO missing destination or side effects
maskMovDI = maskmovdqu( XmmReg1, XmmReg2 );
}
# MAXPD 4-12 PAGE 1132 LINE 59201
@@ -1112,9 +1110,10 @@ define pcodeop vminss_avx ;
@endif
# MOVD/MOVQ 4-55 PAGE 1175 LINE 61362
:VMOVD rm32, XmmReg1 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F) & $(VEX_W0); byte=0x7E; XmmReg1 ... & rm32
:VMOVD rm32, XmmReg1 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F) & $(VEX_W0); byte=0x7E; (XmmReg1 & check_rm32_dest) ... & rm32
{
rm32 = XmmReg1 [0,32];
build check_rm32_dest;
}
# MOVD/MOVQ 4-55 PAGE 1175 LINE 61364
@@ -1253,32 +1252,32 @@ define pcodeop vmovlps_avx ;
# MOVMSKPD 4-88 PAGE 1208 LINE 62906
define pcodeop vmovmskpd_avx ;
:VMOVMSKPD Reg32, XmmReg2 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F) & $(VEX_WIG); byte=0x50; Reg32 & (mod=0x3 & XmmReg2)
:VMOVMSKPD Reg32, XmmReg2 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F) & $(VEX_WIG); byte=0x50; Reg32 & check_Reg32_dest & (mod=0x3 & XmmReg2)
{
Reg32 = vmovmskpd_avx( XmmReg2 );
# TODO Reg64 = zext(Reg32)
build check_Reg32_dest;
}
# MOVMSKPD 4-88 PAGE 1208 LINE 62910
:VMOVMSKPD Reg32, YmmReg2 is $(VEX_NONE) & $(VEX_L256) & $(VEX_PRE_66) & $(VEX_0F) & $(VEX_WIG); byte=0x50; Reg32 & (mod=0x3 & YmmReg2)
:VMOVMSKPD Reg32, YmmReg2 is $(VEX_NONE) & $(VEX_L256) & $(VEX_PRE_66) & $(VEX_0F) & $(VEX_WIG); byte=0x50; Reg32 & check_Reg32_dest & (mod=0x3 & YmmReg2)
{
Reg32 = vmovmskpd_avx( YmmReg2 );
# TODO Reg64 = zext(Reg32)
build check_Reg32_dest;
}
# MOVMSKPS 4-90 PAGE 1210 LINE 62986
define pcodeop vmovmskps_avx ;
:VMOVMSKPS Reg32, XmmReg2 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_NONE) & $(VEX_0F) & $(VEX_WIG); byte=0x50; Reg32 & (mod=0x3 & XmmReg2)
:VMOVMSKPS Reg32, XmmReg2 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_NONE) & $(VEX_0F) & $(VEX_WIG); byte=0x50; Reg32 & check_Reg32_dest & (mod=0x3 & XmmReg2)
{
Reg32 = vmovmskps_avx( XmmReg2 );
# TODO Reg64 = zext(Reg32)
build check_Reg32_dest;
}
# MOVMSKPS 4-90 PAGE 1210 LINE 62990
:VMOVMSKPS Reg32, YmmReg2 is $(VEX_NONE) & $(VEX_L256) & $(VEX_PRE_NONE) & $(VEX_0F) & $(VEX_WIG); byte=0x50; Reg32 & (mod=0x3 & YmmReg2)
:VMOVMSKPS Reg32, YmmReg2 is $(VEX_NONE) & $(VEX_L256) & $(VEX_PRE_NONE) & $(VEX_0F) & $(VEX_WIG); byte=0x50; Reg32 & check_Reg32_dest & (mod=0x3 & YmmReg2)
{
Reg32 = vmovmskps_avx( YmmReg2 );
# TODO Reg64 = zext(Reg32)
build check_Reg32_dest;
}
# MOVNTDQA 4-92 PAGE 1212 LINE 63084
@@ -1766,20 +1765,34 @@ define pcodeop vpcmpeqd_avx ;
# PCMPESTRI 4-253 PAGE 1373 LINE 71311
define pcodeop vpcmpestri_avx ;
:VPCMPESTRI XmmReg1, XmmReg2_m128, imm8 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F3A); byte=0x61; XmmReg1 ... & XmmReg2_m128; imm8
:VPCMPESTRI XmmReg1, XmmReg2_m128, imm8 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F3A) & $(VEX_W0); byte=0x61 & check_ECX_dest; XmmReg1 ... & XmmReg2_m128; imm8
{
vpcmpestri_avx( XmmReg1, XmmReg2_m128, imm8:1 );
# TODO missing destination or side effects
ECX = vpcmpestri_avx( XmmReg1, XmmReg2_m128, imm8:1, EAX, EDX );
build check_ECX_dest;
}
@ifdef IA64
:VPCMPESTRI XmmReg1, XmmReg2_m128, imm8 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F3A) & $(VEX_W1); byte=0x61 & check_ECX_dest; XmmReg1 ... & XmmReg2_m128; imm8
{
ECX = vpcmpestri_avx( XmmReg1, XmmReg2_m128, imm8:1, RAX, RDX );
build check_ECX_dest;
}
@endif
# PCMPESTRM 4-255 PAGE 1375 LINE 71395
define pcodeop vpcmpestrm_avx ;
:VPCMPESTRM XmmReg1, XmmReg2_m128, imm8 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F3A); byte=0x60; XmmReg1 ... & XmmReg2_m128; imm8
:VPCMPESTRM XmmReg1, XmmReg2_m128, imm8 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F3A) & $(VEX_W0); byte=0x60; XmmReg1 ... & XmmReg2_m128; imm8
{
vpcmpestrm_avx( XmmReg1, XmmReg2_m128, imm8:1 );
# TODO missing destination or side effects
XMM0 = vpcmpestrm_avx( XmmReg1, XmmReg2_m128, imm8:1, EAX, EDX );
}
@ifdef IA64
:VPCMPESTRM XmmReg1, XmmReg2_m128, imm8 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F3A) & $(VEX_W1); byte=0x60; XmmReg1 ... & XmmReg2_m128; imm8
{
XMM0 = vpcmpestrm_avx( XmmReg1, XmmReg2_m128, imm8:1, RAX, RDX );
}
@endif
# PCMPGTB/PCMPGTW/PCMPGTD 4-257 PAGE 1377 LINE 71499
define pcodeop vpcmpgtb_avx ;
:VPCMPGTB XmmReg1, vexVVVV_XmmReg, XmmReg2_m128 is $(VEX_NDS) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F) & $(VEX_WIG) & vexVVVV_XmmReg; byte=0x64; (XmmReg1 & ZmmReg1) ... & XmmReg2_m128
@@ -1814,22 +1827,20 @@ define pcodeop vpcmpgtq_avx ;
# PCMPISTRI 4-266 PAGE 1386 LINE 71966
define pcodeop vpcmpistri_avx ;
:VPCMPISTRI XmmReg1, XmmReg2_m128, imm8 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F3A) & $(VEX_WIG); byte=0x63; XmmReg1 ... & XmmReg2_m128; imm8
:VPCMPISTRI XmmReg1, XmmReg2_m128, imm8 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F3A) & $(VEX_WIG); byte=0x63 & check_ECX_dest; XmmReg1 ... & XmmReg2_m128; imm8
{
vpcmpistri_avx( XmmReg1, XmmReg2_m128, imm8:1 );
# TODO missing destination or side effects
ECX = vpcmpistri_avx( XmmReg1, XmmReg2_m128, imm8:1 );
build check_ECX_dest;
}
# PCMPISTRM 4-268 PAGE 1388 LINE 72052
define pcodeop vpcmpistrm_avx ;
:VPCMPISTRM XmmReg1, XmmReg2_m128, imm8 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F3A) & $(VEX_WIG); byte=0x62; XmmReg1 ... & XmmReg2_m128; imm8
{
vpcmpistrm_avx( XmmReg1, XmmReg2_m128, imm8:1 );
# TODO missing destination or side effects
XMM0 = vpcmpistrm_avx( XmmReg1, XmmReg2_m128, imm8:1 );
}
# PEXTRB/PEXTRD/PEXTRQ 4-274 PAGE 1394 LINE 72322
define pcodeop vpextrb_avx ;
:VPEXTRB Rmr32, XmmReg1, imm8 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F3A) & $(VEX_W0); byte=0x14; mod=3 & XmmReg1 & Rmr32 & check_Rmr32_dest; imm8
{
local tmp8:1 = imm8 & 0xf;
@@ -1846,7 +1857,6 @@ define pcodeop vpextrb_avx ;
}
# PEXTRB/PEXTRD/PEXTRQ 4-274 PAGE 1394 LINE 72326
define pcodeop vpextrd_avx ;
:VPEXTRD Rmr32, XmmReg1, imm8 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F3A) & $(VEX_W0); byte=0x16; mod=3 & XmmReg1 & Rmr32 & check_Rmr32_dest; imm8
{
local tmp8:1 = imm8 & 3;
@@ -1875,8 +1885,8 @@ define pcodeop vpextrd_avx ;
# PEXTRW 4-277 PAGE 1397 LINE 72478
:VPEXTRW Reg32, XmmReg2, imm8 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F) & $(VEX_WIG); byte=0xC5; Reg32 & check_Reg32_dest & (mod=0x3 & XmmReg2); imm8
{
local tmp8:1 = imm8 & 7;
local tmp = XmmReg2 >> (tmp8*16);
local sel:1 = imm8 & 0x7;
local tmp = XmmReg2 >> (sel * 16);
Reg32 = zext(tmp[0,16]);
build check_Reg32_dest;
}
@@ -1884,19 +1894,28 @@ define pcodeop vpextrd_avx ;
# PEXTRW 4-277 PAGE 1397 LINE 72483
:VPEXTRW Reg32, XmmReg1, imm8 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F3A) & $(VEX_WIG); byte=0x15; XmmReg1 & mod=3 & Reg32 & check_Reg32_dest; imm8
{
local tmp8:1 = imm8 & 7;
local tmp = XmmReg1 >> (tmp8*16);
local sel:1 = imm8 & 0x7;
local tmp = XmmReg1 >> (sel * 16);
Reg32 = zext(tmp[0,16]);
build check_Reg32_dest;
}
:VPEXTRW m16, XmmReg1, imm8 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F3A) & $(VEX_WIG); byte=0x15; XmmReg1 ... & m16; imm8
{
local tmp8:1 = imm8 & 7;
local tmp = XmmReg1 >> (tmp8*16);
local sel:1 = imm8 & 7;
local tmp = XmmReg1 >> (sel*16);
m16 = tmp[0,16];
}
:VPEXTRW m16, XmmReg1, imm8 is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F3A) & $(VEX_W0); byte=0x15; XmmReg1 ... & m16; imm8
{
local sel:1 = imm8 & 0x7;
local tmp = XmmReg1 >> (sel * 16);
local res:2 = tmp(0);
m16 = res;
}
# PHADDW/PHADDD 4-280 PAGE 1400 LINE 72627
define pcodeop vphaddw_avx ;
:VPHADDW XmmReg1, vexVVVV_XmmReg, XmmReg2_m128 is $(VEX_NDS) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F38) & $(VEX_WIG) & vexVVVV_XmmReg; byte=0x01; (XmmReg1 & ZmmReg1) ... & XmmReg2_m128
File diff suppressed because it is too large Load Diff
@@ -159,15 +159,17 @@
}
# KMOVW/KMOVB/KMOVQ/KMOVD 3-499 PAGE 1069 LINE 56184
:KMOVW Reg32, KReg_rm is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_NONE) & $(VEX_0F) & $(VEX_W0); byte=0x93; Reg32 & KReg_rm
:KMOVW Reg32, KReg_rm is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_NONE) & $(VEX_0F) & $(VEX_W0); byte=0x93; Reg32 & KReg_rm & check_Reg32_dest
{
Reg32 = zext(KReg_rm[0,16]);
build check_Reg32_dest;
}
# KMOVW/KMOVB/KMOVQ/KMOVD 3-499 PAGE 1069 LINE 56186
:KMOVB Reg32, KReg_rm is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F) & $(VEX_W0); byte=0x93; Reg32 & KReg_rm
:KMOVB Reg32, KReg_rm is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_66) & $(VEX_0F) & $(VEX_W0); byte=0x93; Reg32 & KReg_rm & check_Reg32_dest
{
Reg32 = zext(KReg_rm[0,8]);
build check_Reg32_dest;
}
# KMOVW/KMOVB/KMOVQ/KMOVD 3-499 PAGE 1069 LINE 56188
@@ -179,9 +181,10 @@
@endif
# KMOVW/KMOVB/KMOVQ/KMOVD 3-499 PAGE 1069 LINE 56190
:KMOVD Reg32, KReg_rm is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_F2) & $(VEX_0F) & $(VEX_W0); byte=0x93; Reg32 & KReg_rm
:KMOVD Reg32, KReg_rm is $(VEX_NONE) & $(VEX_L128) & $(VEX_PRE_F2) & $(VEX_0F) & $(VEX_W0); byte=0x93; Reg32 & KReg_rm & check_Reg32_dest
{
Reg32 = KReg_rm[0,32];
build check_Reg32_dest;
}
# KNOTW/KNOTB/KNOTQ/KNOTD 3-501 PAGE 1071 LINE 56266
File diff suppressed because it is too large Load Diff
@@ -643,7 +643,7 @@
}
@endif
:CMPXCHG8B^lockx m64 is vexMode=0 & lockx & unlock & byte=0xf; byte=0xc7; ( mod != 0b11 & reg_opcode=1 ) ... & m64
:CMPXCHG8B^lockx m64 is vexMode=0 & lockx & unlock & byte=0xf; byte=0xc7; ( mod != 0b11 & reg_opcode=1 & check_EAX_dest & check_EDX_dest ) ... & m64
{
build lockx;
local dest = m64;
@@ -651,6 +651,8 @@
if (ZF == 1) goto <equal>;
EDX = dest(4);
EAX = dest:4;
build check_EAX_dest;
build check_EDX_dest;
goto <done>;
<equal>
m64 = (zext(ECX) << 32) | zext(EBX);
@@ -1196,13 +1198,14 @@
build unlock;
}
:XADD^lockx m32,Reg32 is vexMode=0 & lockx & unlock & opsize=1 & byte=0x0F; byte=0xC1; m32 & Reg32 ...
:XADD^lockx m32,Reg32 is vexMode=0 & lockx & unlock & opsize=1 & byte=0x0F; byte=0xC1; (check_Reg32_dest & Reg32) ... & m32
{
build lockx;
build m32;
addflags(m32,Reg32);
local tmp = m32 + Reg32;
Reg32 = m32;
build check_Reg32_dest;
m32 = tmp;
resultflags(tmp);
build unlock;
@@ -12,11 +12,12 @@ macro rdflags(){
rdflags();
}
:RDRAND Rmr32 is vexMode=0 & opsize=1 & byte=0x0f; byte=0xC7; mod=3 & Rmr32 & reg_opcode=6
:RDRAND Rmr32 is vexMode=0 & opsize=1 & byte=0x0f; byte=0xC7; mod=3 & Rmr32 & check_Reg32_dest & reg_opcode=6
{
Rmr32 = rdrand();
CF=rdrandIsValid();
rdflags();
build check_Reg32_dest;
}
@ifdef IA64
:RDRAND Rmr64 is $(LONGMODE_ON) & vexMode=0 & opsize=2 & $(REX_W) & byte=0x0f; byte=0xC7; mod=3 & Rmr64 & reg_opcode=6
@@ -35,11 +36,12 @@ define pcodeop rdseedIsValid;
CF=rdseedIsValid();
rdflags();
}
:RDSEED Rmr32 is vexMode=0 & opsize=1 & byte=0x0f; byte=0xC7; mod=3 & Rmr32 & reg_opcode=7
:RDSEED Rmr32 is vexMode=0 & opsize=1 & byte=0x0f; byte=0xC7; mod=3 & Rmr32 & check_Rmr32_dest & reg_opcode=7
{
Rmr32 = rdseed();
CF=rdseedIsValid();
rdflags();
build check_Rmr32_dest;
}
@ifdef IA64
:RDSEED Rmr64 is $(LONGMODE_ON) & vexMode=0 & opsize=2 & $(REX_W) & byte=0x0f; byte=0xC7; mod=3 & Rmr64 & reg_opcode=7
@@ -5,7 +5,7 @@
endian="little"
size="32"
variant="default"
version="4.8"
version="4.9"
slafile="x86.sla"
processorspec="x86.pspec"
manualindexfile="../manuals/x86.idx"
@@ -37,7 +37,7 @@
endian="little"
size="32"
variant="System Management Mode"
version="4.8"
version="4.9"
slafile="x86.sla"
processorspec="x86-16.pspec"
manualindexfile="../manuals/x86.idx"
@@ -50,7 +50,7 @@
endian="little"
size="16"
variant="Real Mode"
version="4.8"
version="4.9"
slafile="x86.sla"
processorspec="x86-16-real.pspec"
manualindexfile="../manuals/x86.idx"
@@ -70,7 +70,7 @@
endian="little"
size="16"
variant="Protected Mode"
version="4.8"
version="4.9"
slafile="x86.sla"
processorspec="x86-16.pspec"
manualindexfile="../manuals/x86.idx"
@@ -85,7 +85,7 @@
endian="little"
size="64"
variant="default"
version="4.8"
version="4.9"
slafile="x86-64.sla"
processorspec="x86-64.pspec"
manualindexfile="../manuals/x86.idx"
@@ -108,7 +108,7 @@
endian="little"
size="64"
variant="compat32"
version="4.8"
version="4.9"
slafile="x86-64.sla"
processorspec="x86-64-compat32.pspec"
manualindexfile="../manuals/x86.idx"
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
@@ -169,3 +169,7 @@ VMARGS=--enable-native-access=ALL-UNNAMED
# Prevents PyGhidra from restoring sys.modules to its original state after a PyGhidra script is run.
# Used to help debug potential issues that might arise from mucking with sys.modules.
#VMARGS=-Dpyghidra.sys.modules.restore.disable=true
# Full path to the native Swift demangler binary. This is typically named "swift", but some Swift
# installations also provide a standalone "swift-demangle" binary.
#ENVVARS=GHIDRA_SWIFT_DEMANGLER=
+1 -1
View File
@@ -1,5 +1,5 @@
application.name=Ghidra
application.version=12.1.3
application.version=12.1.4
application.release.name=DEV
application.layout.version=3
application.gradle.min=8.5