[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix formatting in gas/cgen.c
From: |
Nick Clifton |
Subject: |
Fix formatting in gas/cgen.c |
Date: |
13 Oct 2001 10:41:38 +0100 |
Hi Guys,
I am applying the patch below to tidy up the formatting in
gas/cgen.c.
Cheers
Nick
2001-10-13 Nick Clifton <address@hidden>
* cgen.c: Tidy up formatting.
Index: cgen.c
===================================================================
RCS file: /cvs/src/src/gas/cgen.c,v
retrieving revision 1.14
diff -p -r1.14 cgen.c
*** cgen.c 2001/08/01 01:44:25 1.14
--- cgen.c 2001/10/13 09:43:54
*************** queue_fixup (opindex, opinfo, expP)
*** 129,208 ****
*/
struct saved_fixups {
! struct fixup fixup_chain[GAS_CGEN_MAX_FIXUPS];
! int num_fixups_in_chain;
};
static struct saved_fixups stored_fixups[MAX_SAVED_FIXUP_CHAINS];
! void
gas_cgen_initialize_saved_fixups_array ()
{
! int i = 0;
! while (i < MAX_SAVED_FIXUP_CHAINS)
! stored_fixups[i++].num_fixups_in_chain = 0;
}
! void
! gas_cgen_save_fixups (int i)
{
! if (i < 0 || i >= MAX_SAVED_FIXUP_CHAINS)
! {
! as_fatal("index into stored_fixups[] out of bounds");
! return;
! }
! stored_fixups[i].num_fixups_in_chain = num_fixups;
! memcpy(stored_fixups[i].fixup_chain, fixups,
! sizeof (fixups[0])*num_fixups);
! num_fixups = 0;
}
! void
! gas_cgen_restore_fixups (int i)
{
! if (i < 0 || i >= MAX_SAVED_FIXUP_CHAINS)
! {
! as_fatal("index into stored_fixups[] out of bounds");
! return;
! }
! num_fixups = stored_fixups[i].num_fixups_in_chain;
! memcpy(fixups,stored_fixups[i].fixup_chain,
! (sizeof (stored_fixups[i].fixup_chain[0]))*num_fixups);
! stored_fixups[i].num_fixups_in_chain = 0;
}
! void
! gas_cgen_swap_fixups (int i)
{
! int tmp;
! struct fixup tmp_fixup;
! if (i < 0 || i >= MAX_SAVED_FIXUP_CHAINS)
! {
! as_fatal("index into stored_fixups[] out of bounds");
! return;
! }
!
! if (num_fixups == 0)
! {
! gas_cgen_restore_fixups (i);
! }
! else if (stored_fixups[i].num_fixups_in_chain == 0)
! {
! gas_cgen_save_fixups (i);
! }
! else
! {
! tmp = stored_fixups[i].num_fixups_in_chain;
! stored_fixups[i].num_fixups_in_chain = num_fixups;
! num_fixups = tmp;
!
! for (tmp = GAS_CGEN_MAX_FIXUPS; tmp--;)
! {
! tmp_fixup = stored_fixups[i].fixup_chain [tmp];
! stored_fixups[i].fixup_chain[tmp] = fixups [tmp];
! fixups [tmp] = tmp_fixup;
! }
}
}
--- 129,212 ----
*/
struct saved_fixups {
! struct fixup fixup_chain[GAS_CGEN_MAX_FIXUPS];
! int num_fixups_in_chain;
};
static struct saved_fixups stored_fixups[MAX_SAVED_FIXUP_CHAINS];
! void
gas_cgen_initialize_saved_fixups_array ()
{
! int i = 0;
!
! while (i < MAX_SAVED_FIXUP_CHAINS)
! stored_fixups[i++].num_fixups_in_chain = 0;
}
! void
! gas_cgen_save_fixups (i)
! int i;
{
! if (i < 0 || i >= MAX_SAVED_FIXUP_CHAINS)
! {
! as_fatal ("index into stored_fixups[] out of bounds");
! return;
! }
!
! stored_fixups[i].num_fixups_in_chain = num_fixups;
! memcpy (stored_fixups[i].fixup_chain, fixups,
! sizeof (fixups[0]) * num_fixups);
! num_fixups = 0;
}
! void
! gas_cgen_restore_fixups (i)
! int i;
{
! if (i < 0 || i >= MAX_SAVED_FIXUP_CHAINS)
! {
! as_fatal ("index into stored_fixups[] out of bounds");
! return;
! }
!
! num_fixups = stored_fixups[i].num_fixups_in_chain;
! memcpy (fixups,stored_fixups[i].fixup_chain,
! (sizeof (stored_fixups[i].fixup_chain[0])) * num_fixups);
! stored_fixups[i].num_fixups_in_chain = 0;
}
! void
! gas_cgen_swap_fixups (i)
! int i;
{
! if (i < 0 || i >= MAX_SAVED_FIXUP_CHAINS)
! {
! as_fatal ("index into stored_fixups[] out of bounds");
! return;
! }
!
! if (num_fixups == 0)
! gas_cgen_restore_fixups (i);
! else if (stored_fixups[i].num_fixups_in_chain == 0)
! gas_cgen_save_fixups (i);
!
! else
! {
! int tmp;
! struct fixup tmp_fixup;
!
! tmp = stored_fixups[i].num_fixups_in_chain;
! stored_fixups[i].num_fixups_in_chain = num_fixups;
! num_fixups = tmp;
!
! for (tmp = GAS_CGEN_MAX_FIXUPS; tmp--;)
! {
! tmp_fixup = stored_fixups[i].fixup_chain [tmp];
! stored_fixups[i].fixup_chain[tmp] = fixups [tmp];
! fixups [tmp] = tmp_fixup;
! }
}
}
*************** gas_cgen_parse_operand (cd, want, strP,
*** 338,344 ****
expr_jmp_buf_p = 0;
input_line_pointer = (char *) hold;
*resultP_1 = CGEN_PARSE_OPERAND_RESULT_ERROR;
! return "illegal operand";
}
expr_jmp_buf_p = 1;
--- 342,348 ----
expr_jmp_buf_p = 0;
input_line_pointer = (char *) hold;
*resultP_1 = CGEN_PARSE_OPERAND_RESULT_ERROR;
! return _("illegal operand");
}
expr_jmp_buf_p = 1;
*************** gas_cgen_md_apply_fix3 (fixP, valueP, se
*** 691,701 ****
fixP->fx_r_type, bfd_get_reloc_code_name
(fixP->fx_r_type));
break;
}
- }
- else
- {
- /* bfd_install_relocation will be called to finish things up. */
}
/* Tuck `value' away for use by tc_gen_reloc.
See the comment describing fx_addnumber in write.h.
--- 695,703 ----
fixP->fx_r_type, bfd_get_reloc_code_name
(fixP->fx_r_type));
break;
}
}
+ /* else
+ bfd_install_relocation will be called to finish things up. */
/* Tuck `value' away for use by tc_gen_reloc.
See the comment describing fx_addnumber in write.h.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Fix formatting in gas/cgen.c,
Nick Clifton <=