Commit d006f5eb by Richard Henderson Committed by Richard Henderson

configure.ac (HAVE_AS_JSRDIRECT_RELOCS): New.

        * configure.ac (HAVE_AS_JSRDIRECT_RELOCS): New.
        * config.in, configure: Rebuild.
        * config/alpha/alpha.c (print_operand): Add 'j'.
        * alpha.md (divmodsi_internal_er_1): Use it.
        (divmoddi_internal_er_1): Likewise.

From-SVN: r100435
parent 13a9737c
2005-06-01 Richard Henderson <rth@redhat.com>
* configure.ac (HAVE_AS_JSRDIRECT_RELOCS): New.
* config.in, configure: Rebuild.
* config/alpha/alpha.c (print_operand): Add 'j'.
* alpha.md (divmodsi_internal_er_1): Use it.
(divmoddi_internal_er_1): Likewise.
2005-06-01 Richard Sandiford <rsandifo@redhat.com> 2005-06-01 Richard Sandiford <rsandifo@redhat.com>
* system.h (TARGET_OPTIONS, TARGET_SWITCHES): Poison. * system.h (TARGET_OPTIONS, TARGET_SWITCHES): Poison.
......
...@@ -185,6 +185,12 @@ ...@@ -185,6 +185,12 @@
#endif #endif
/* Define if your assembler supports the lituse_jsrdirect relocation. */
#ifndef USED_FOR_TARGET
#undef HAVE_AS_JSRDIRECT_RELOCS
#endif
/* Define if your assembler supports .sleb128 and .uleb128. */ /* Define if your assembler supports .sleb128 and .uleb128. */
#ifndef USED_FOR_TARGET #ifndef USED_FOR_TARGET
#undef HAVE_AS_LEB128 #undef HAVE_AS_LEB128
......
...@@ -4921,6 +4921,20 @@ print_operand (FILE *file, rtx x, int code) ...@@ -4921,6 +4921,20 @@ print_operand (FILE *file, rtx x, int code)
} }
break; break;
case 'j':
{
const char *lituse;
#ifdef HAVE_AS_JSRDIRECT_RELOCS
lituse = "lituse_jsrdirect";
#else
lituse = "lituse_jsr";
#endif
gcc_assert (INTVAL (x) != 0);
fprintf (file, "\t\t!%s!%d", lituse, (int) INTVAL (x));
}
break;
case 'r': case 'r':
/* If this operand is the constant zero, write it as "$31". */ /* If this operand is the constant zero, write it as "$31". */
if (GET_CODE (x) == REG) if (GET_CODE (x) == REG)
......
...@@ -978,7 +978,7 @@ ...@@ -978,7 +978,7 @@
(clobber (reg:DI 23)) (clobber (reg:DI 23))
(clobber (reg:DI 28))] (clobber (reg:DI 28))]
"TARGET_EXPLICIT_RELOCS && ! TARGET_ABI_OPEN_VMS" "TARGET_EXPLICIT_RELOCS && ! TARGET_ABI_OPEN_VMS"
"ldq $27,__%E3($29)\t\t!literal!%#\;jsr $23,($27),__%E3\t\t!lituse_jsr!%#" "#"
"&& reload_completed" "&& reload_completed"
[(parallel [(set (match_dup 0) [(parallel [(set (match_dup 0)
(sign_extend:DI (match_dup 3))) (sign_extend:DI (match_dup 3)))
...@@ -1023,7 +1023,7 @@ ...@@ -1023,7 +1023,7 @@
(clobber (reg:DI 23)) (clobber (reg:DI 23))
(clobber (reg:DI 28))] (clobber (reg:DI 28))]
"TARGET_EXPLICIT_RELOCS && ! TARGET_ABI_OPEN_VMS" "TARGET_EXPLICIT_RELOCS && ! TARGET_ABI_OPEN_VMS"
"jsr $23,($27),__%E3%J5" "jsr $23,($27),__%E3%j5"
[(set_attr "type" "jsr") [(set_attr "type" "jsr")
(set_attr "length" "4")]) (set_attr "length" "4")])
...@@ -1047,7 +1047,7 @@ ...@@ -1047,7 +1047,7 @@
(clobber (reg:DI 23)) (clobber (reg:DI 23))
(clobber (reg:DI 28))] (clobber (reg:DI 28))]
"TARGET_EXPLICIT_RELOCS && ! TARGET_ABI_OPEN_VMS" "TARGET_EXPLICIT_RELOCS && ! TARGET_ABI_OPEN_VMS"
"ldq $27,__%E3($29)\t\t!literal!%#\;jsr $23,($27),__%E3\t\t!lituse_jsr!%#" "#"
"&& reload_completed" "&& reload_completed"
[(parallel [(set (match_dup 0) (match_dup 3)) [(parallel [(set (match_dup 0) (match_dup 3))
(use (match_dup 0)) (use (match_dup 0))
...@@ -1091,7 +1091,7 @@ ...@@ -1091,7 +1091,7 @@
(clobber (reg:DI 23)) (clobber (reg:DI 23))
(clobber (reg:DI 28))] (clobber (reg:DI 28))]
"TARGET_EXPLICIT_RELOCS && ! TARGET_ABI_OPEN_VMS" "TARGET_EXPLICIT_RELOCS && ! TARGET_ABI_OPEN_VMS"
"jsr $23,($27),__%E3%J5" "jsr $23,($27),__%E3%j5"
[(set_attr "type" "jsr") [(set_attr "type" "jsr")
(set_attr "length" "4")]) (set_attr "length" "4")])
......
...@@ -14159,6 +14159,45 @@ cat >>confdefs.h <<\_ACEOF ...@@ -14159,6 +14159,45 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF _ACEOF
fi fi
echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5
echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6
if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
gcc_cv_as_alpha_jsrdirect_relocs=no
if test $in_tree_gas = yes; then
if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90`
then gcc_cv_as_alpha_jsrdirect_relocs=yes
fi
elif test x$gcc_cv_as != x; then
echo ' .set nomacro
.text
ldq $27, a($29) !literal!1
jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s
if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }
then
gcc_cv_as_alpha_jsrdirect_relocs=yes
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi
echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5
echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6
if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_JSRDIRECT_RELOCS 1
_ACEOF
fi
;; ;;
cris-*-*) cris-*-*)
......
...@@ -2641,6 +2641,14 @@ case "$target" in ...@@ -2641,6 +2641,14 @@ case "$target" in
lda $29, 0($29) !gpdisp!3],, lda $29, 0($29) !gpdisp!3],,
[AC_DEFINE(HAVE_AS_EXPLICIT_RELOCS, 1, [AC_DEFINE(HAVE_AS_EXPLICIT_RELOCS, 1,
[Define if your assembler supports explicit relocations.])]) [Define if your assembler supports explicit relocations.])])
gcc_GAS_CHECK_FEATURE([jsrdirect relocation support],
gcc_cv_as_alpha_jsrdirect_relocs, [2,16,90],,
[ .set nomacro
.text
ldq $27, a($29) !literal!1
jsr $26, ($27), a !lituse_jsrdirect!1],,
[AC_DEFINE(HAVE_AS_JSRDIRECT_RELOCS, 1,
[Define if your assembler supports the lituse_jsrdirect relocation.])])
;; ;;
cris-*-*) cris-*-*)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment