Branch: Tag:

2011-05-16

2011-05-16 21:22:41 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler (amd64): Changed calling conventions for inter_return_opcode_F_CATCH().

1138: Inside #if defined(PIKE_USE_MACHINE_CODE) and #if defined(OPCODE_INLINE_RETURN)
   *    * Arguments:    * addr: -  * Entry-point for the catch block. +  * Address where the continue POINTER (INT32) is stored. +  * Directly after the POINTER is the ENTRY for the catch block.    * -  * continue_addr: -  * Offset from addr for code after the catch (and after ENTRY). -  * +     * Returns:    * (PIKE_OPCODE_T *)-1 on INTER_RETURN.    * jump_destination otherwise.    */ - PIKE_OPCODE_T *inter_return_opcode_F_CATCH(PIKE_OPCODE_T *addr, -  INT32 continue_addr) + PIKE_OPCODE_T *inter_return_opcode_F_CATCH(PIKE_OPCODE_T *addr)   {   #ifdef PIKE_DEBUG    if (d_flag || Pike_interpreter.trace_level > 2) {    low_debug_instr_prologue (F_CATCH - F_OFFSET);    if (Pike_interpreter.trace_level>3) { -  sprintf(trace_buffer, -  "- Addr = %p\n" -  "- Continue = 0x%ld\n", -  addr, continue_addr); +  sprintf(trace_buffer, "- Addr = %p\n", addr);    write_to_stderr(trace_buffer,strlen(trace_buffer));    }    }
1171: Inside #if defined(PIKE_USE_MACHINE_CODE)
   init_recovery (&new_catch_ctx->recovery, 0);   #endif    new_catch_ctx->save_expendible = Pike_fp->expendible; -  new_catch_ctx->continue_reladdr = continue_addr +  new_catch_ctx->continue_reladdr = ((INT32 *)addr)[0]    /* We need to run the entry prologue... */    - ENTRY_PROLOGUE_SIZE;   
1179: Inside #if defined(PIKE_USE_MACHINE_CODE)
   new_catch_ctx->prev = Pike_interpreter.catch_ctx;    Pike_interpreter.catch_ctx = new_catch_ctx;    DO_IF_DEBUG({ -  TRACE((3,"- Pushed catch context %p\n", new_catch_ctx)); +  TRACE((CATCH_TRACE_LEVEL,"- Pushed catch context %p\n", new_catch_ctx));    });    }       Pike_fp->expendible = Pike_fp->locals + Pike_fp->num_locals;    - #if 0 +     /* Need to adjust next_addr by sizeof(INT32) to skip past the jump    * address to the continue position after the catch block. */    addr = (PIKE_OPCODE_T *) ((INT32 *) addr + 1); - #endif +        if (Pike_interpreter.catching_eval_jmpbuf) {    /* There's already a catching_eval_instruction around our