258 }
259 return new DummyAddress(debugger, value);
260 }
261
262 public Address orWithMask(long mask) throws UnsupportedOperationException {
263 long value = addr | mask;
264 if (value == 0) {
265 return null;
266 }
267 return new DummyAddress(debugger, value);
268 }
269
270 public Address xorWithMask(long mask) throws UnsupportedOperationException {
271 long value = addr ^ mask;
272 if (value == 0) {
273 return null;
274 }
275 return new DummyAddress(debugger, value);
276 }
277
278 //--------------------------------------------------------------------------------
279 // Internals only below this point
280 //
281
282 long getValue() {
283 return addr;
284 }
285
286 private static void check(boolean arg, String failMessage) {
287 if (!arg) {
288 System.err.println(failMessage + ": FAILED");
289 System.exit(1);
290 }
291 }
292
293 // Test harness
294 public static void main(String[] args) {
295 // p/n indicates whether the interior address is really positive
296 // or negative. In unsigned terms, p1 < p2 < n1 < n2.
297
|
258 }
259 return new DummyAddress(debugger, value);
260 }
261
262 public Address orWithMask(long mask) throws UnsupportedOperationException {
263 long value = addr | mask;
264 if (value == 0) {
265 return null;
266 }
267 return new DummyAddress(debugger, value);
268 }
269
270 public Address xorWithMask(long mask) throws UnsupportedOperationException {
271 long value = addr ^ mask;
272 if (value == 0) {
273 return null;
274 }
275 return new DummyAddress(debugger, value);
276 }
277
278 public long asLongValue() { return addr; }
279 //--------------------------------------------------------------------------------
280 // Internals only below this point
281 //
282
283 long getValue() {
284 return addr;
285 }
286
287 private static void check(boolean arg, String failMessage) {
288 if (!arg) {
289 System.err.println(failMessage + ": FAILED");
290 System.exit(1);
291 }
292 }
293
294 // Test harness
295 public static void main(String[] args) {
296 // p/n indicates whether the interior address is really positive
297 // or negative. In unsigned terms, p1 < p2 < n1 < n2.
298
|