Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/alpha/predicates.md @ 55:77e2b8dfacca gcc-4.4.5
update it from 4.4.3 to 4.5.0
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 23:39:51 +0900 |
parents | 3bfb6c00c1e0 |
children | b7f97abdc517 |
comparison
equal
deleted
inserted
replaced
52:c156f1bd5cd9 | 55:77e2b8dfacca |
---|---|
110 ;; Return 1 if OP is a constant that is a mask of ones of width of an | 110 ;; Return 1 if OP is a constant that is a mask of ones of width of an |
111 ;; integral machine mode not larger than DImode. | 111 ;; integral machine mode not larger than DImode. |
112 (define_predicate "mode_mask_operand" | 112 (define_predicate "mode_mask_operand" |
113 (match_code "const_int,const_double") | 113 (match_code "const_int,const_double") |
114 { | 114 { |
115 if (GET_CODE (op) == CONST_INT) | 115 if (CONST_INT_P (op)) |
116 { | 116 { |
117 HOST_WIDE_INT value = INTVAL (op); | 117 HOST_WIDE_INT value = INTVAL (op); |
118 | 118 |
119 if (value == 0xff) | 119 if (value == 0xff) |
120 return 1; | 120 return 1; |
324 (define_predicate "local_symbolic_operand" | 324 (define_predicate "local_symbolic_operand" |
325 (match_code "label_ref,const,symbol_ref") | 325 (match_code "label_ref,const,symbol_ref") |
326 { | 326 { |
327 if (GET_CODE (op) == CONST | 327 if (GET_CODE (op) == CONST |
328 && GET_CODE (XEXP (op, 0)) == PLUS | 328 && GET_CODE (XEXP (op, 0)) == PLUS |
329 && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT) | 329 && CONST_INT_P (XEXP (XEXP (op, 0), 1))) |
330 op = XEXP (XEXP (op, 0), 0); | 330 op = XEXP (XEXP (op, 0), 0); |
331 | 331 |
332 if (GET_CODE (op) == LABEL_REF) | 332 if (GET_CODE (op) == LABEL_REF) |
333 return 1; | 333 return 1; |
334 | 334 |
348 if (! TARGET_SMALL_DATA) | 348 if (! TARGET_SMALL_DATA) |
349 return 0; | 349 return 0; |
350 | 350 |
351 if (GET_CODE (op) == CONST | 351 if (GET_CODE (op) == CONST |
352 && GET_CODE (XEXP (op, 0)) == PLUS | 352 && GET_CODE (XEXP (op, 0)) == PLUS |
353 && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT) | 353 && CONST_INT_P (XEXP (XEXP (op, 0), 1))) |
354 op = XEXP (XEXP (op, 0), 0); | 354 op = XEXP (XEXP (op, 0), 0); |
355 | 355 |
356 if (GET_CODE (op) != SYMBOL_REF) | 356 if (GET_CODE (op) != SYMBOL_REF) |
357 return 0; | 357 return 0; |
358 | 358 |
372 (define_predicate "global_symbolic_operand" | 372 (define_predicate "global_symbolic_operand" |
373 (match_code "const,symbol_ref") | 373 (match_code "const,symbol_ref") |
374 { | 374 { |
375 if (GET_CODE (op) == CONST | 375 if (GET_CODE (op) == CONST |
376 && GET_CODE (XEXP (op, 0)) == PLUS | 376 && GET_CODE (XEXP (op, 0)) == PLUS |
377 && GET_CODE (XEXP (XEXP (op, 0), 1)) == CONST_INT) | 377 && CONST_INT_P (XEXP (XEXP (op, 0), 1))) |
378 op = XEXP (XEXP (op, 0), 0); | 378 op = XEXP (XEXP (op, 0), 0); |
379 | 379 |
380 if (GET_CODE (op) != SYMBOL_REF) | 380 if (GET_CODE (op) != SYMBOL_REF) |
381 return 0; | 381 return 0; |
382 | 382 |
390 (ior (match_code "symbol_ref,label_ref") | 390 (ior (match_code "symbol_ref,label_ref") |
391 (and (match_code "const") | 391 (and (match_code "const") |
392 (match_test "GET_CODE (XEXP (op,0)) == PLUS | 392 (match_test "GET_CODE (XEXP (op,0)) == PLUS |
393 && (GET_CODE (XEXP (XEXP (op,0), 0)) == SYMBOL_REF | 393 && (GET_CODE (XEXP (XEXP (op,0), 0)) == SYMBOL_REF |
394 || GET_CODE (XEXP (XEXP (op,0), 0)) == LABEL_REF) | 394 || GET_CODE (XEXP (XEXP (op,0), 0)) == LABEL_REF) |
395 && GET_CODE (XEXP (XEXP (op,0), 1)) == CONST_INT")))) | 395 && CONST_INT_P (XEXP (XEXP (op,0), 1))")))) |
396 | 396 |
397 ;; Return true if OP is valid for 16-bit DTP relative relocations. | 397 ;; Return true if OP is valid for 16-bit DTP relative relocations. |
398 (define_predicate "dtp16_symbolic_operand" | 398 (define_predicate "dtp16_symbolic_operand" |
399 (and (match_code "const") | 399 (and (match_code "const") |
400 (match_test "tls_symbolic_operand_1 (op, 16, UNSPEC_DTPREL)"))) | 400 (match_test "tls_symbolic_operand_1 (op, 16, UNSPEC_DTPREL)"))) |
437 (define_special_predicate "aligned_memory_operand" | 437 (define_special_predicate "aligned_memory_operand" |
438 (ior (match_test "op = resolve_reload_operand (op), 0") | 438 (ior (match_test "op = resolve_reload_operand (op), 0") |
439 (match_code "mem")) | 439 (match_code "mem")) |
440 { | 440 { |
441 rtx base; | 441 rtx base; |
442 int offset; | |
443 | 442 |
444 if (MEM_ALIGN (op) >= 32) | 443 if (MEM_ALIGN (op) >= 32) |
445 return 1; | 444 return 1; |
446 | |
447 op = XEXP (op, 0); | 445 op = XEXP (op, 0); |
448 | 446 |
449 /* LEGITIMIZE_RELOAD_ADDRESS creates (plus (plus reg const_hi) const_lo) | 447 /* LEGITIMIZE_RELOAD_ADDRESS creates (plus (plus reg const_hi) const_lo) |
450 sorts of constructs. Dig for the real base register. */ | 448 sorts of constructs. Dig for the real base register. */ |
451 if (reload_in_progress | 449 if (reload_in_progress |
452 && GET_CODE (op) == PLUS | 450 && GET_CODE (op) == PLUS |
453 && GET_CODE (XEXP (op, 0)) == PLUS) | 451 && GET_CODE (XEXP (op, 0)) == PLUS) |
454 { | 452 base = XEXP (XEXP (op, 0), 0); |
455 base = XEXP (XEXP (op, 0), 0); | |
456 offset = INTVAL (XEXP (op, 1)); | |
457 } | |
458 else | 453 else |
459 { | 454 { |
460 if (! memory_address_p (mode, op)) | 455 if (! memory_address_p (mode, op)) |
461 return 0; | 456 return 0; |
462 if (GET_CODE (op) == PLUS) | 457 base = (GET_CODE (op) == PLUS ? XEXP (op, 0) : op); |
463 { | |
464 base = XEXP (op, 0); | |
465 offset = INTVAL (XEXP (op, 1)); | |
466 } | |
467 else | |
468 { | |
469 base = op; | |
470 offset = 0; | |
471 } | |
472 } | 458 } |
473 | 459 |
474 if (offset % GET_MODE_SIZE (mode)) | 460 return (REG_P (base) && REGNO_POINTER_ALIGN (REGNO (base)) >= 32); |
475 return 0; | |
476 | |
477 return (GET_CODE (base) == REG && REGNO_POINTER_ALIGN (REGNO (base)) >= 32); | |
478 }) | 461 }) |
479 | 462 |
480 ;; Similar, but return 1 if OP is a MEM which is not alignable. | 463 ;; Similar, but return 1 if OP is a MEM which is not alignable. |
481 | 464 |
482 (define_special_predicate "unaligned_memory_operand" | 465 (define_special_predicate "unaligned_memory_operand" |
483 (ior (match_test "op = resolve_reload_operand (op), 0") | 466 (ior (match_test "op = resolve_reload_operand (op), 0") |
484 (match_code "mem")) | 467 (match_code "mem")) |
485 { | 468 { |
486 rtx base; | 469 rtx base; |
487 int offset; | |
488 | 470 |
489 if (MEM_ALIGN (op) >= 32) | 471 if (MEM_ALIGN (op) >= 32) |
490 return 0; | 472 return 0; |
491 | |
492 op = XEXP (op, 0); | 473 op = XEXP (op, 0); |
493 | 474 |
494 /* LEGITIMIZE_RELOAD_ADDRESS creates (plus (plus reg const_hi) const_lo) | 475 /* LEGITIMIZE_RELOAD_ADDRESS creates (plus (plus reg const_hi) const_lo) |
495 sorts of constructs. Dig for the real base register. */ | 476 sorts of constructs. Dig for the real base register. */ |
496 if (reload_in_progress | 477 if (reload_in_progress |
497 && GET_CODE (op) == PLUS | 478 && GET_CODE (op) == PLUS |
498 && GET_CODE (XEXP (op, 0)) == PLUS) | 479 && GET_CODE (XEXP (op, 0)) == PLUS) |
499 { | 480 base = XEXP (XEXP (op, 0), 0); |
500 base = XEXP (XEXP (op, 0), 0); | |
501 offset = INTVAL (XEXP (op, 1)); | |
502 } | |
503 else | 481 else |
504 { | 482 { |
505 if (! memory_address_p (mode, op)) | 483 if (! memory_address_p (mode, op)) |
506 return 0; | 484 return 0; |
507 if (GET_CODE (op) == PLUS) | 485 base = (GET_CODE (op) == PLUS ? XEXP (op, 0) : op); |
508 { | |
509 base = XEXP (op, 0); | |
510 offset = INTVAL (XEXP (op, 1)); | |
511 } | |
512 else | |
513 { | |
514 base = op; | |
515 offset = 0; | |
516 } | |
517 } | 486 } |
518 | 487 |
519 if (offset % GET_MODE_SIZE (mode)) | 488 return (REG_P (base) && REGNO_POINTER_ALIGN (REGNO (base)) < 32); |
520 return 1; | |
521 | |
522 return (GET_CODE (base) == REG && REGNO_POINTER_ALIGN (REGNO (base)) < 32); | |
523 }) | 489 }) |
524 | 490 |
525 ;; Return 1 if OP is any memory location. During reload a pseudo matches. | 491 ;; Return 1 if OP is any memory location. During reload a pseudo matches. |
526 (define_special_predicate "any_memory_operand" | 492 (define_special_predicate "any_memory_operand" |
527 (match_code "mem,reg,subreg") | 493 (match_code "mem,reg,subreg") |
575 ;; int->fp conversion. */ | 541 ;; int->fp conversion. */ |
576 (define_predicate "reg_no_subreg_operand" | 542 (define_predicate "reg_no_subreg_operand" |
577 (and (match_code "reg") | 543 (and (match_code "reg") |
578 (match_operand 0 "register_operand"))) | 544 (match_operand 0 "register_operand"))) |
579 | 545 |
546 ;; Return 1 if OP is a valid Alpha comparison operator for "cbranch" | |
547 ;; instructions. | |
548 (define_predicate "alpha_cbranch_operator" | |
549 (ior (match_operand 0 "ordered_comparison_operator") | |
550 (match_code "ordered,unordered"))) | |
551 | |
580 ;; Return 1 if OP is a valid Alpha comparison operator for "cmp" style | 552 ;; Return 1 if OP is a valid Alpha comparison operator for "cmp" style |
581 ;; instructions. | 553 ;; instructions. |
582 (define_predicate "alpha_comparison_operator" | 554 (define_predicate "alpha_comparison_operator" |
583 (match_code "eq,le,lt,leu,ltu")) | 555 (match_code "eq,le,lt,leu,ltu")) |
584 | 556 |