From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26275 invoked by alias); 30 Apr 2008 17:28:31 -0000 Received: (qmail 26235 invoked by uid 367); 30 Apr 2008 17:28:31 -0000 Date: Wed, 30 Apr 2008 17:28:00 -0000 Message-ID: <20080430172830.26219.qmail@sourceware.org> From: cagney@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: In frysk-asm.h replace ill defined WORD with REGISTER and VARIABLE. X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 9098065cb3da049818fc76987acd3d0c409694df X-Git-Newrev: 0cc129863793737189bc3a50c885836ad8abc0f9 Mailing-List: contact frysk-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-cvs-owner@sourceware.org Reply-To: frysk@sourceware.org X-SW-Source: 2008-q2/txt/msg00166.txt.bz2 The branch, master has been updated via 0cc129863793737189bc3a50c885836ad8abc0f9 (commit) from 9098065cb3da049818fc76987acd3d0c409694df (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 0cc129863793737189bc3a50c885836ad8abc0f9 Author: Andrew Cagney Date: Wed Apr 30 13:26:56 2008 -0400 In frysk-asm.h replace ill defined WORD with REGISTER and VARIABLE. frysk-core/frysk/pkglibdir/ChangeLog 2008-04-30 Andrew Cagney * funit-asm.S: Update; use LOAD_REGISTER et.al.; initialize REG0 from memory. * funit-watchpoint.S: Ditto. * funit-stepping-asm.S: Ditto. * funit-symbols.S: Ditto. * funit-rt-asmstepper.S: Ditto. * funit-raise.S: Ditto. * funit-location.S: Ditto. * funit-instructions.S: Ditto. * funit-frameless.S: Ditto. * funit-elf-symbols.S: Ditto. * funit-iftester.S: Ditto. frysk-imports/include/ChangeLog 2008-04-30 Andrew Cagney * frysk-asm.h (VARIABLE): Rename WORD. (LOAD_REGISTER_IMMED): Rename LOAD_IMMED_WORD. (LOAD_REGISTER): Rename LOAD_WORD. (STORE_REGISTER): Rename STORE_WORD. (LOAD_BYTE_IMMED): Rename LOAD_IMMED_BYTE. (MOVE): Rename MOV. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/pkglibdir/ChangeLog | 15 +++ frysk-core/frysk/pkglibdir/funit-asm.S | 22 +++- frysk-core/frysk/pkglibdir/funit-elf-symbols.S | 9 +- frysk-core/frysk/pkglibdir/funit-frameless.S | 6 +- frysk-core/frysk/pkglibdir/funit-iftester.S | 4 +- frysk-core/frysk/pkglibdir/funit-instructions.S | 8 +- frysk-core/frysk/pkglibdir/funit-location.S | 12 +- frysk-core/frysk/pkglibdir/funit-raise.S | 46 ++++---- frysk-core/frysk/pkglibdir/funit-rt-asmstepper.S | 14 +- frysk-core/frysk/pkglibdir/funit-stepping-asm.S | 6 +- frysk-core/frysk/pkglibdir/funit-symbols.S | 120 ++++++++++---------- frysk-core/frysk/pkglibdir/funit-watchpoint.S | 15 +-- frysk-imports/include/ChangeLog | 9 ++ frysk-imports/include/frysk-asm.h | 132 ++++++++++++---------- 14 files changed, 230 insertions(+), 188 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/pkglibdir/ChangeLog b/frysk-core/frysk/pkglibdir/ChangeLog index 85a7a4d..29804f5 100644 --- a/frysk-core/frysk/pkglibdir/ChangeLog +++ b/frysk-core/frysk/pkglibdir/ChangeLog @@ -1,3 +1,18 @@ +2008-04-30 Andrew Cagney + + * funit-asm.S: Update; use LOAD_REGISTER et.al.; initialize REG0 + from memory. + * funit-watchpoint.S: Ditto. + * funit-stepping-asm.S: Ditto. + * funit-symbols.S: Ditto. + * funit-rt-asmstepper.S: Ditto. + * funit-raise.S: Ditto. + * funit-location.S: Ditto. + * funit-instructions.S: Ditto. + * funit-frameless.S: Ditto. + * funit-elf-symbols.S: Ditto. + * funit-iftester.S: Ditto. + 2008-04-30 Stan Cox * funit-type-class.cxx (class_nested_class): New. diff --git a/frysk-core/frysk/pkglibdir/funit-asm.S b/frysk-core/frysk/pkglibdir/funit-asm.S index 0ade98c..458f740 100644 --- a/frysk-core/frysk/pkglibdir/funit-asm.S +++ b/frysk-core/frysk/pkglibdir/funit-asm.S @@ -45,19 +45,29 @@ // A known global symbol for checking the PC. .global crash crash: - STORE_WORD(REG0,REG0) + STORE_REGISTER(REG0,REG0) NOP FUNCTION_BEGIN(main,0) MAIN_PROLOGUE(0) - LOAD_IMMED_WORD(REG0, 1) - LOAD_IMMED_WORD(REG1, 2) - LOAD_IMMED_WORD(REG2, 3) - LOAD_IMMED_WORD(REG3, 4) - LOAD_IMMED_WORD(SP, 5) + // Load REG0 from memory. + LOAD_REGISTER_IMMED(REG0, reg0) + LOAD_REGISTER(REG0, REG0) + LOAD_REGISTER_IMMED(REG1, 2) + LOAD_REGISTER_IMMED(REG2, 3) + LOAD_REGISTER_IMMED(REG3, 4) + LOAD_REGISTER_IMMED(SP, 5) JUMP(crash) MAIN_EPILOGUE(0) FUNCTION_RETURN(main,0) FUNCTION_END(main,0) + + // Wrap the value in garbage so a 64-bit load of a 32-bit word + // picks up garbage. + .data + .byte 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7 + VARIABLE(reg0, 1) + .data + .byte 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7 diff --git a/frysk-core/frysk/pkglibdir/funit-elf-symbols.S b/frysk-core/frysk/pkglibdir/funit-elf-symbols.S index c76203a..169671d 100644 --- a/frysk-core/frysk/pkglibdir/funit-elf-symbols.S +++ b/frysk-core/frysk/pkglibdir/funit-elf-symbols.S @@ -39,19 +39,16 @@ #include "frysk-asm.h" -WORD(first, 0x4E38220C)// 12345678 +VARIABLE(first, 0x4E38220C)// 12345678 FUNCTION_BEGIN(main,0) MAIN_PROLOGUE(0) // crash -LOAD_IMMED_WORD (REG0, 0) -STORE_WORD (REG0, REG0) +LOAD_REGISTER_IMMED(REG0, 0) +STORE_REGISTER(REG0, REG0) // End. And exit MAIN_EPILOGUE(0) FUNCTION_RETURN(main,0) FUNCTION_END(main,0) - - - diff --git a/frysk-core/frysk/pkglibdir/funit-frameless.S b/frysk-core/frysk/pkglibdir/funit-frameless.S index 0ba5712..a856cc3 100644 --- a/frysk-core/frysk/pkglibdir/funit-frameless.S +++ b/frysk-core/frysk/pkglibdir/funit-frameless.S @@ -47,11 +47,11 @@ FRAMELESS_FUNCTION_BEGIN(foo) - MOV(REG0, REG1) + MOVE(REG0, REG1) FRAMELESS_ADJ_RETURN (REG1) NO_OP ; NO_OP - LOAD_IMMED_WORD(REG0, .L1) + LOAD_REGISTER_IMMED(REG0, .L1) JUMP(bar) // _stepFramelessEntry_ .L1: @@ -63,7 +63,7 @@ FUNCTION_BEGIN(main, 0) MAIN_PROLOGUE(0) - LOAD_IMMED_WORD(REG0, .L2) + LOAD_REGISTER_IMMED(REG0, .L2) JUMP(foo) .L2: diff --git a/frysk-core/frysk/pkglibdir/funit-iftester.S b/frysk-core/frysk/pkglibdir/funit-iftester.S index 85b9b7c..bf10e87 100644 --- a/frysk-core/frysk/pkglibdir/funit-iftester.S +++ b/frysk-core/frysk/pkglibdir/funit-iftester.S @@ -43,8 +43,8 @@ FUNCTION_BEGIN(foo,0) FUNCTION_PROLOGUE(foo,0) NO_OP // _lineStepFunctionEntry_ - LOAD_IMMED_BYTE (REG0,0x0) - LOAD_IMMED_BYTE (REG1,0x1) + LOAD_BYTE_IMMED(REG0,0x0) + LOAD_BYTE_IMMED(REG1,0x1) COMPARE(REG0, REG1) ; JUMP_NE(L1) // _lineStepIfFail_ NO_OP NO_OP diff --git a/frysk-core/frysk/pkglibdir/funit-instructions.S b/frysk-core/frysk/pkglibdir/funit-instructions.S index 3909b28..e38a339 100644 --- a/frysk-core/frysk/pkglibdir/funit-instructions.S +++ b/frysk-core/frysk/pkglibdir/funit-instructions.S @@ -80,13 +80,13 @@ iend: NO_OP // check enter/exit of functions. FUNCTION_BEGIN(subfunc,0) FUNCTION_PROLOGUE(subfunc,0) - LOAD_IMMED_BYTE(REG2,1) + LOAD_BYTE_IMMED(REG2,1) sublabel: - LOAD_IMMED_BYTE(REG0, 1) + LOAD_BYTE_IMMED(REG0, 1) COMPARE(REG2,REG0) JUMP_NE(sublabel) // never taken - LOAD_IMMED_BYTE(REG2,2) - LOAD_IMMED_BYTE(REG0,1) + LOAD_BYTE_IMMED(REG2,2) + LOAD_BYTE_IMMED(REG0,1) COMPARE(REG2,REG0) JUMP_NE(subexit) // always taken JUMP(sublabel) diff --git a/frysk-core/frysk/pkglibdir/funit-location.S b/frysk-core/frysk/pkglibdir/funit-location.S index 9dc2f43..316c059 100644 --- a/frysk-core/frysk/pkglibdir/funit-location.S +++ b/frysk-core/frysk/pkglibdir/funit-location.S @@ -42,17 +42,17 @@ FUNCTION_BEGIN(main,0) MAIN_PROLOGUE(0) -LOAD_IMMED_WORD (REG0, 0) -LOAD_IMMED_WORD (REG1, 987) -LOAD_IMMED_WORD (REG3, 0x12345678) +LOAD_REGISTER_IMMED(REG0, 0) +LOAD_REGISTER_IMMED(REG1, 987) +LOAD_REGISTER_IMMED(REG3, 0x12345678) -LOAD_IMMED_WORD (REG2, memory) +LOAD_REGISTER_IMMED(REG2, memory) -STORE_WORD (REG0, REG0) // To crash program +STORE_REGISTER(REG0, REG0) // To crash program MAIN_EPILOGUE(0) FUNCTION_RETURN(main,0) FUNCTION_END(main,0) // Set up memory locations -WORD(memory, 0x12341234) +VARIABLE(memory, 0x12341234) diff --git a/frysk-core/frysk/pkglibdir/funit-raise.S b/frysk-core/frysk/pkglibdir/funit-raise.S index c6a3ce2..2256451 100644 --- a/frysk-core/frysk/pkglibdir/funit-raise.S +++ b/frysk-core/frysk/pkglibdir/funit-raise.S @@ -66,17 +66,17 @@ #define RAISE_FUNCTION_END(X) .size X, .-X RAISE_FUNCTION_START(div_zero) - LOAD_IMMED_BYTE(REG0, 0) - LOAD_IMMED_BYTE(REG1, 0) + LOAD_BYTE_IMMED(REG0, 0) + LOAD_BYTE_IMMED(REG1, 0) div_zero_label: DIV_ZERO(REG1) NO_OP ; // never reached RAISE_FUNCTION_END(div_zero) RAISE_FUNCTION_START(bad_addr_segv) - LOAD_IMMED_BYTE (REG0, 0) + LOAD_BYTE_IMMED (REG0, 0) bad_addr_segv_label: - STORE_WORD (REG0, REG0) + STORE_REGISTER(REG0, REG0) NO_OP ; // never reached RAISE_FUNCTION_END(bad_addr_segv) @@ -87,29 +87,29 @@ bad_inst_ill_label: RAISE_FUNCTION_END(bad_inst_ill) RAISE_FUNCTION_START(term_sig_hup) - LOAD_IMMED_BYTE(REG0, SYS_gettid) + LOAD_BYTE_IMMED(REG0, SYS_gettid) SYSCALL - LOAD_IMMED_BYTE(REG1,0) + LOAD_BYTE_IMMED(REG1,0) ADD(REG0,REG1) - LOAD_IMMED_BYTE(REG2,SIGHUP) - LOAD_IMMED_BYTE(REG0, SYS_tkill) + LOAD_BYTE_IMMED(REG2,SIGHUP) + LOAD_BYTE_IMMED(REG0, SYS_tkill) term_sig_hup_label: SYSCALL NO_OP ; // never reached RAISE_FUNCTION_END(term_sig_hup) RAISE_FUNCTION_START(ign_sig_urg) - LOAD_IMMED_BYTE(REG0, SYS_gettid) + LOAD_BYTE_IMMED(REG0, SYS_gettid) SYSCALL - LOAD_IMMED_BYTE(REG1,0) + LOAD_BYTE_IMMED(REG1,0) ADD(REG0,REG1) - LOAD_IMMED_BYTE(REG2,SIGURG) - LOAD_IMMED_BYTE(REG0, SYS_tkill) + LOAD_BYTE_IMMED(REG2,SIGURG) + LOAD_BYTE_IMMED(REG0, SYS_tkill) ign_sig_urg_label: SYSCALL NO_OP ; // Reached! // Exit nicely - LOAD_IMMED_BYTE(REG0, 0) + LOAD_BYTE_IMMED(REG0, 0) JUMP(exit_main) RAISE_FUNCTION_END(ign_sig_urg) @@ -117,37 +117,37 @@ FUNCTION_BEGIN(main,0) MAIN_PROLOGUE(0) // Get argc (REG1) and see what the user wanted. - LOAD_IMMED_BYTE(REG3, 2) + LOAD_BYTE_IMMED(REG3, 2) COMPARE(REG3, REG1) JUMP_EQ(div_zero) - LOAD_IMMED_BYTE(REG3, 3) + LOAD_BYTE_IMMED(REG3, 3) COMPARE(REG3, REG1) JUMP_EQ(bad_addr_segv) - LOAD_IMMED_BYTE(REG3, 4) + LOAD_BYTE_IMMED(REG3, 4) COMPARE(REG3, REG1) JUMP_EQ(bad_inst_ill) - LOAD_IMMED_BYTE(REG3, 5) + LOAD_BYTE_IMMED(REG3, 5) COMPARE(REG3, REG1) JUMP_EQ(term_sig_hup) - LOAD_IMMED_BYTE(REG3, 6) + LOAD_BYTE_IMMED(REG3, 6) COMPARE(REG3, REG1) JUMP_EQ(ign_sig_urg) // Unknown, print usage. - LOAD_IMMED_BYTE(REG0, SYS_write) - LOAD_IMMED_BYTE(REG1, 1) + LOAD_BYTE_IMMED(REG0, SYS_write) + LOAD_BYTE_IMMED(REG1, 1) - LOAD_IMMED_WORD(REG2, usage) - LOAD_IMMED_WORD(REG3, .usage-usage) + LOAD_REGISTER_IMMED(REG2, usage) + LOAD_REGISTER_IMMED(REG3, .usage-usage) SYSCALL // Non-zero return - LOAD_IMMED_BYTE(REG0, 1) + LOAD_BYTE_IMMED(REG0, 1) exit_main: MAIN_EPILOGUE(0) diff --git a/frysk-core/frysk/pkglibdir/funit-rt-asmstepper.S b/frysk-core/frysk/pkglibdir/funit-rt-asmstepper.S index 896d926..acb7567 100644 --- a/frysk-core/frysk/pkglibdir/funit-rt-asmstepper.S +++ b/frysk-core/frysk/pkglibdir/funit-rt-asmstepper.S @@ -45,10 +45,10 @@ FUNCTION_BEGIN(main,0) MAIN_PROLOGUE(0) - LOAD_IMMED_BYTE (REG0, 0x14) - LOAD_IMMED_BYTE (REG1, 1) - LOAD_IMMED_BYTE (REG2, 2) - LOAD_IMMED_BYTE (REG3, 3) + LOAD_BYTE_IMMED(REG0, 0x14) + LOAD_BYTE_IMMED(REG1, 1) + LOAD_BYTE_IMMED(REG2, 2) + LOAD_BYTE_IMMED(REG3, 3) // SYSCALL NO_OP // _asmSingleStepStart_ NO_OP // _asmSingleStepFinish_ @@ -57,11 +57,11 @@ MAIN_PROLOGUE(0) NO_OP // _asmMultiStepFinish_ NO_OP ; NO_OP ; NO_OP NO_OP; - LOAD_IMMED_BYTE(REG0, 1) ; COMPARE(REG1, REG0) + LOAD_BYTE_IMMED(REG0, 1) ; COMPARE(REG1, REG0) JUMP_NE (fail) - LOAD_IMMED_BYTE(REG0, 2) ; COMPARE(REG2, REG0) + LOAD_BYTE_IMMED(REG0, 2) ; COMPARE(REG2, REG0) JUMP_NE (fail) - LOAD_IMMED_BYTE(REG0, 3) ; COMPARE(REG3, REG0) + LOAD_BYTE_IMMED(REG0, 3) ; COMPARE(REG3, REG0) JUMP_NE (fail) JUMP (jump_to) // _asmStepJump_ NO_OP diff --git a/frysk-core/frysk/pkglibdir/funit-stepping-asm.S b/frysk-core/frysk/pkglibdir/funit-stepping-asm.S index cde2b22..c64f397 100644 --- a/frysk-core/frysk/pkglibdir/funit-stepping-asm.S +++ b/frysk-core/frysk/pkglibdir/funit-stepping-asm.S @@ -59,9 +59,9 @@ FUNCTION_BEGIN(third,0) FUNCTION_PROLOGUE(third,0) NO_OP // _stepOutStart_ - LOAD_IMMED_BYTE(REG0,0x0) - LOAD_IMMED_BYTE(REG1,0x1) - LOAD_IMMED_BYTE(REG2,0x2) + LOAD_BYTE_IMMED(REG0,0x0) + LOAD_BYTE_IMMED(REG1,0x1) + LOAD_BYTE_IMMED(REG2,0x2) FUNCTION_CALL(fourth) ADD(REG0,REG1) ADD(REG0,REG2) diff --git a/frysk-core/frysk/pkglibdir/funit-symbols.S b/frysk-core/frysk/pkglibdir/funit-symbols.S index 810e107..cbb0063 100644 --- a/frysk-core/frysk/pkglibdir/funit-symbols.S +++ b/frysk-core/frysk/pkglibdir/funit-symbols.S @@ -52,8 +52,8 @@ # A global symbol that includes its size. GLOBAL(global_st_size) - LOAD_IMMED_BYTE (REG0, 0) - STORE_WORD (REG0, REG0) + LOAD_BYTE_IMMED(REG0, 0) + STORE_REGISTER(REG0, REG0) NO_OP SIZE(global_st_size) @@ -61,8 +61,8 @@ GLOBAL(global_st_size) # A local symbol that includes its size. LOCAL(local_st_size) - LOAD_IMMED_BYTE (REG0, 0) - STORE_WORD (REG0, REG0) + LOAD_BYTE_IMMED(REG0, 0) + STORE_REGISTER(REG0, REG0) NO_OP SIZE(local_st_size) @@ -70,16 +70,16 @@ LOCAL(local_st_size) # A global symbol that has zero size. GLOBAL(global_st_size_0) - LOAD_IMMED_BYTE (REG0, 0) - STORE_WORD (REG0, REG0) + LOAD_BYTE_IMMED(REG0, 0) + STORE_REGISTER(REG0, REG0) NO_OP # A local symbol that has zero size. LOCAL(local_st_size_0) - LOAD_IMMED_BYTE (REG0, 0) - STORE_WORD (REG0, REG0) + LOAD_BYTE_IMMED(REG0, 0) + STORE_REGISTER(REG0, REG0) NO_OP @@ -87,18 +87,18 @@ LOCAL(local_st_size_0) # A global symbol, with size, that contains a nested global and local # symbols each also with sizes. GLOBAL(global_outer) - STORE_WORD(REG0, REG0) + STORE_REGISTER(REG0, REG0) NO_OP GLOBAL(global_in_global) - STORE_WORD (REG0, REG0) + STORE_REGISTER(REG0, REG0) NO_OP SIZE(global_in_global) LOCAL(local_in_global) - STORE_WORD(REG0, REG0) + STORE_REGISTER(REG0, REG0) NO_OP SIZE(local_in_global) .Lglobal_outer: - STORE_WORD(REG0, REG0) + STORE_REGISTER(REG0, REG0) NO_OP SIZE(global_outer) @@ -106,7 +106,7 @@ LOCAL(local_in_global) # Code with no symbol after a global symbol with size. .Lno_global: - STORE_WORD(REG0, REG0) + STORE_REGISTER(REG0, REG0) NO_OP @@ -114,18 +114,18 @@ LOCAL(local_in_global) # A global symbol, with size, that contains a nested global and local # symbols each also with sizes. LOCAL(local_outer) - STORE_WORD(REG0,REG0) + STORE_REGISTER(REG0,REG0) NO_OP GLOBAL(global_in_local) - STORE_WORD(REG0, REG0) + STORE_REGISTER(REG0, REG0) NO_OP SIZE(global_in_local) LOCAL(local_in_local) - STORE_WORD(REG0, REG0) + STORE_REGISTER(REG0, REG0) NO_OP SIZE(local_in_local) .Llocal_outer: - STORE_WORD(REG0, REG0) + STORE_REGISTER(REG0, REG0) NO_OP SIZE(local_outer) @@ -133,7 +133,7 @@ LOCAL(local_in_local) # Code with no symbol after a local symbol with size. .Lno_local: - STORE_WORD(REG0, REG0) + STORE_REGISTER(REG0, REG0) NO_OP @@ -144,20 +144,20 @@ LOCAL(local_in_local) GLOBAL(global_after_0) NO_OP GLOBAL(global_0_in_global) - STORE_WORD(REG0, REG0) + STORE_REGISTER(REG0, REG0) NO_OP LOCAL(local_0_in_global) - STORE_WORD(REG0, REG0) + STORE_REGISTER(REG0, REG0) NO_OP .Lglobal_after_0: - STORE_WORD(REG0, REG0) + STORE_REGISTER(REG0, REG0) SIZE(global_after_0) # Code with no symbol after a global with nexted zero-sized symbols. .Lafter_global_containing_0: - STORE_WORD(REG0, REG0) + STORE_REGISTER(REG0, REG0) NO_OP @@ -168,20 +168,20 @@ LOCAL(local_0_in_global) LOCAL(local_after_0) NO_OP GLOBAL(global_0_in_local) - STORE_WORD(REG0, REG0) + STORE_REGISTER(REG0, REG0) NO_OP LOCAL(local_0_in_local) - STORE_WORD(REG0, REG0) + STORE_REGISTER(REG0, REG0) NO_OP .Llocal_after_0: - STORE_WORD(REG0, REG0) + STORE_REGISTER(REG0, REG0) SIZE(local_after_0) hooks/post-receive -- frysk system monitor/debugger