X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=bfd%2Fxtensa-isa.c;fp=bfd%2Fxtensa-isa.c;h=138f6eceb7254e696c3c8cf0876c863489b6e43c;hp=ced8257914e80b9a765b40a7e79ee85d705ebb8b;hb=d5da4f291af551c0b8b79e1d4a9b173d60e5c10e;hpb=7b5ea4fcdf2819e070665ab5610f8b48e3867c10 diff --git a/bfd/xtensa-isa.c b/bfd/xtensa-isa.c index ced8257..138f6ec 100644 --- a/bfd/xtensa-isa.c +++ b/bfd/xtensa-isa.c @@ -1,5 +1,5 @@ /* Configurable Xtensa ISA support. - Copyright 2003, 2004, 2005, 2007 Free Software Foundation, Inc. + Copyright 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -411,7 +411,12 @@ xtensa_isa_num_pipe_stages (xtensa_isa isa) xtensa_opcode opcode; xtensa_funcUnit_use *use; int num_opcodes, num_uses; - int i, stage, max_stage = XTENSA_UNDEFINED; + int i, stage; + static int max_stage = XTENSA_UNDEFINED; + + /* Only compute the value once. */ + if (max_stage != XTENSA_UNDEFINED) + return max_stage + 1; num_opcodes = xtensa_isa_num_opcodes (isa); for (opcode = 0; opcode < num_opcodes; opcode++) @@ -1521,6 +1526,17 @@ xtensa_state_is_exported (xtensa_isa isa, xtensa_state st) } +int +xtensa_state_is_shared_or (xtensa_isa isa, xtensa_state st) +{ + xtensa_isa_internal *intisa = (xtensa_isa_internal *) isa; + CHECK_STATE (intisa, st, XTENSA_UNDEFINED); + if ((intisa->states[st].flags & XTENSA_STATE_IS_SHARED_OR) != 0) + return 1; + return 0; +} + + /* Sysregs. */