Skip to content

Commit 0d2fb28

Browse files
committed
Merge branch 'GP-0_ryanmkurtz_PR-3784_GameCubeGBA_outOfBounds'
Conflicts: Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/sem/AssemblyPatternBlock.java
2 parents 0c08aa0 + a2bcc7a commit 0d2fb28

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/sem/AssemblyPatternBlock.java

-45
Original file line numberDiff line numberDiff line change
@@ -103,51 +103,6 @@ public static AssemblyPatternBlock fromBytes(int offset, byte[] vals) {
103103
return res;
104104
}
105105

106-
/**
107-
* Convert the given long to a pattern block (having offset 0 and a full mask)
108-
*
109-
* <p>
110-
* <b>NOTE:</b> The result will be 8 bytes in length
111-
*
112-
* @param value the value to convert
113-
* @return the pattern block containing the big-endian representation of the value
114-
*/
115-
public static AssemblyPatternBlock fromLong(long value) {
116-
byte[] mask = new byte[8];
117-
byte[] vals = new byte[8];
118-
for (int i = vals.length; i >= 0; i--) {
119-
mask[i] = -1;
120-
vals[i] = (byte) (value & 0xff);
121-
value >>= 8;
122-
}
123-
AssemblyPatternBlock res = new AssemblyPatternBlock(0, mask, vals);
124-
return res;
125-
}
126-
127-
/**
128-
* Convert the given masked long to a pattern block (having offset 0)
129-
*
130-
* <p>
131-
* <b>NOTE:</b> The result will be 8 bytes in length
132-
*
133-
* @param ml the masked long, whose values and mask to convert
134-
* @return the pattern block containing the big-endian representation of the value
135-
*/
136-
public static AssemblyPatternBlock fromMaskedLong(MaskedLong ml) {
137-
byte[] mask = new byte[8];
138-
byte[] vals = new byte[8];
139-
long lmask = ml.getMask();
140-
long value = ml.longValue();
141-
for (int i = vals.length; i >= 0; i--) {
142-
mask[i] = (byte) (lmask & 0xff);
143-
vals[i] = (byte) (value & 0xff);
144-
lmask >>= 8;
145-
value >>= 8;
146-
}
147-
AssemblyPatternBlock res = new AssemblyPatternBlock(0, mask, vals);
148-
return res;
149-
}
150-
151106
/**
152107
* Convert a string representation to a pattern block
153108
*

0 commit comments

Comments
 (0)