aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index b488471..90f8ff4 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -138,6 +138,12 @@ int stack_pointer;
const unsigned char *linenumber_table;
int linenumber_count;
+/* Largest pc so far in this method that has been passed to lookup_label. */
+int highest_label_pc_this_method = -1;
+
+/* Base value for this method to add to pc to get generated label. */
+int start_label_pc_this_method = 0;
+
void
init_expr_processing (void)
{
@@ -1766,7 +1772,9 @@ lookup_label (int pc)
{
tree name;
char buf[32];
- ASM_GENERATE_INTERNAL_LABEL(buf, "LJpc=", pc);
+ if (pc > highest_label_pc_this_method)
+ highest_label_pc_this_method = pc;
+ ASM_GENERATE_INTERNAL_LABEL(buf, "LJpc=", start_label_pc_this_method + pc);
name = get_identifier (buf);
if (IDENTIFIER_LOCAL_VALUE (name))
return IDENTIFIER_LOCAL_VALUE (name);