Fixes for building SleighEditor, buildreadme, and added popcount to

grammar
This commit is contained in:
emteere
2020-10-09 17:39:08 -04:00
parent e33d593e52
commit 04ddbf5981
8 changed files with 56 additions and 2 deletions
@@ -5,6 +5,16 @@ apply plugin: 'java'
if (hasProperty("eclipseDSL")) {
apply plugin: 'eclipse'
eclipse {
// Check to make sure the generated build folders exists
def srcGenFolder = file ("src-gen")
if (!srcGenFolder.exists()) {
srcGenFolder.mkdirs()
}
def xtendGenFolder = file ("xtend-gen")
if (!xtendGenFolder.exists()) {
xtendGenFolder.mkdirs()
}
project {
name = 'Eclipse SleighEditor IDE'
buildCommand 'org.eclipse.pde.ManifestBuilder'
@@ -5,6 +5,16 @@ apply plugin: 'java'
if (hasProperty("eclipseDSL")) {
apply plugin: 'eclipse'
eclipse {
// Check to make sure the generated build folders exists
def srcGenFolder = file ("src-gen")
if (!srcGenFolder.exists()) {
srcGenFolder.mkdirs()
}
def xtendGenFolder = file ("xtend-gen")
if (!xtendGenFolder.exists()) {
xtendGenFolder.mkdirs()
}
project {
name = 'Eclipse SleighEditor Tests'
buildCommand 'org.eclipse.pde.ManifestBuilder'
@@ -181,6 +181,7 @@ class SleighParsingTest {
@if defined(ENDIAN)
reg = tmp;
@endif
tmp = popcount(CC);
}
Dest: loc is op=0 [ loc = inst_next; ] { export loc; }
@@ -5,6 +5,16 @@ apply plugin: 'java'
if (hasProperty("eclipseDSL")) {
apply plugin: 'eclipse'
eclipse {
// Check to make sure the generated build folders exists
def srcGenFolder = file ("src-gen")
if (!srcGenFolder.exists()) {
srcGenFolder.mkdirs()
}
def xtendGenFolder = file ("xtend-gen")
if (!xtendGenFolder.exists()) {
xtendGenFolder.mkdirs()
}
project {
name = 'Eclipse SleighEditor UI Tests'
buildCommand 'org.eclipse.pde.ManifestBuilder'
@@ -5,6 +5,16 @@ apply plugin: 'java'
if (hasProperty("eclipseDSL")) {
apply plugin: 'eclipse'
eclipse {
// Check to make sure the generated build folders exists
def srcGenFolder = file ("src-gen")
if (!srcGenFolder.exists()) {
srcGenFolder.mkdirs()
}
def xtendGenFolder = file ("xtend-gen")
if (!xtendGenFolder.exists()) {
xtendGenFolder.mkdirs()
}
project {
name = 'Eclipse SleighEditor UI'
buildCommand 'org.eclipse.pde.ManifestBuilder'
@@ -5,6 +5,16 @@ apply plugin: 'java'
if (hasProperty("eclipseDSL")) {
apply plugin: 'eclipse'
eclipse {
// Check to make sure the generated build folders exists
def srcGenFolder = file ("src-gen")
if (!srcGenFolder.exists()) {
srcGenFolder.mkdirs()
}
def xtendGenFolder = file ("xtend-gen")
if (!xtendGenFolder.exists()) {
xtendGenFolder.mkdirs()
}
project {
name = 'Eclipse SleighEditor'
buildCommand 'org.eclipse.pde.ManifestBuilder'
@@ -13,13 +13,13 @@ have added 80Meg.
Importing GhidraSleighEditor Eclipse projects (they are deactivated by default):
1) Uncomment the line in settings.gradle that includes the GhidraSleighEditor project.
2) Run "gradle eclipse -PSleighEditor" to generate the GhidraSleighEditor Eclipse projects.
2) Run "gradle eclipse -PeclipseDSL" to generate the GhidraSleighEditor Eclipse projects.
3) From Eclipse, File --> Import --> General --> Existing Projects into Workspace
4) From the ghidra repo, import all "Eclipse GhidraSleighEditor *" projects.
Generating all Sleigh XTEXT generated files:
1) open ghidra.xtext.sleigh project
1) open "Eclipse SleighEditor" project
2) navigate to the file src --> ghidra.xtext.sleigh --> GenerateSleigh.mwe2
3) NOTE: the following will download a jar file from the internet (not from NSA)
unless you pre-download.
@@ -28,6 +28,8 @@ Generating all Sleigh XTEXT generated files:
3c) Rename the file to .antlr-generator-3.2.0-patch.jar
3) From the popup menu RunAs --> MWE2 Workflow
- Files in xtend-gen and src-gen will be created
4) If there are any red bookmarks on any of the Eclipse Sliehg* projects,
- Select all the Eclipse Sleigh* projects, and refresh from the popup menu
- The project should rebuild, and there should be no red Problem errors
@@ -658,6 +658,7 @@ exprSingle returns Expression:
| pcodeop='ceil' '(' op1=expr ')'
| pcodeop='floor' '(' op1=expr ')'
| pcodeop='round' '(' op1=expr ')'
| pcodeop='popcount' '(' op1=expr ')'
| pcodeop='cpool' '(' op1=expr ',' op2=expr ',' op3=expr ')'
| pcodeop='newobject' '(' op1=newObjParams ')'
| op=[macroOrPcode] op1=paramlist