changeset 75379ad2028e in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=75379ad2028e
description:
        Add copy implementations to palcode.

        palcode/osfpal.s:
            Add copypal loop copy implementation.

diffstat:

 system/alpha/palcode/osfpal.s                      |   123 +-
 system/alpha/palcode/osfpal_cache_copy.s           |  5257 ++++++++++++++++++++
 system/alpha/palcode/osfpal_cache_copy_unaligned.s |  5253 +++++++++++++++++++
 3 files changed, 10631 insertions(+), 2 deletions(-)

diffs (truncated from 10662 to 300 lines):

diff -r 8e85b6d54396 -r 75379ad2028e system/alpha/palcode/osfpal.s
--- a/system/alpha/palcode/osfpal.s     Mon May 17 02:04:19 2004 -0400
+++ b/system/alpha/palcode/osfpal.s     Mon May 17 17:18:32 2004 -0400
@@ -3143,7 +3143,7 @@
        //
 
        mfpr    r31, pt0                // pad last load to icsr write (in case 
of replay, icsr will be written anyway) //orig
-       mfpr    r31, pt0                // "                                    
                                        //orig
+       mfpr    r31, pt0                // ""                                   
                                        //orig
        mfpr    r0, icsr                // Get icsr                             
                                        //orig
 //orig ldah    r2,  <1@<icsr_v_sde-16>>(r31)   // Get a one in SHADOW_ENABLE 
bit location
        ldah    r2,  (1<<(ICSR_V_SDE-16))(r31)  // Get a one in SHADOW_ENABLE 
bit location                              //orig
@@ -4707,7 +4707,8 @@
 
        CALL_PAL_UNPRIV(0x00BF)
 CallPal_OpcDecBF:
-       br      r31, osfpal_calpal_opcdec
+       // MODIFIED BY EGH 2/25/04
+       br      r31, copypal_impl
        
        
 /*======================================================================*/
@@ -5121,3 +5122,121 @@
        br      r31, pal_ic_flush               // Pal restriction - must flush 
Icache if changing ICSR<SPE>
 #endif
 
+
+copypal_impl:  
+       mov r16, r0      
+       ble r18, finished       #if len <=0 we are finished 
+       ldq_u r8, 0(r17) 
+       xor r17, r16, r9 
+       and r9, 7, r9 
+       and r16, 7, r10 
+       bne r9, unaligned 
+       beq r10, aligned         
+       ldq_u r9, 0(r16) 
+       addq r18, r10, r18
+       mskqh r8, r17, r8
+       mskql r9, r17, r9
+       bis r8, r9, r8
+aligned:
+       subq r18, 1, r10
+       bic r10, 7, r10
+       and r18, 7, r18
+       beq r10, aligned_done
+loop:
+       stq_u r8, 0(r16)
+       ldq_u r8, 8(r17)
+       subq r10, 8, r10
+       lda r16,8(r16)
+       lda r17,8(r17)
+       bne r10, loop
+aligned_done:
+       bne r18, few_left
+       stq_u r8, 0(r16)
+       br r31, finished
+       few_left:
+       mskql r8, r18, r10
+       ldq_u r9, 0(r16)
+       mskqh r9, r18, r9
+       bis r10, r9, r10
+       stq_u r10, 0(r16)
+       br r31, finished
+unaligned:
+       addq r17, r18, r25
+       cmpule r18, 8, r9
+       bne r9, unaligned_few_left
+       beq r10, unaligned_dest_aligned
+       and r16, 7, r10
+       subq r31, r10, r10
+       addq r10, 8, r10
+       ldq_u r9, 7(r17)
+       extql r8, r17, r8
+       extqh r9, r17, r9
+       bis r8, r9, r12
+       insql r12, r16, r12
+       ldq_u r13, 0(r16)
+       mskql r13, r16, r13
+       bis r12, r13, r12
+       stq_u r12, 0(r16)
+       addq r16, r10, r16
+       addq r17, r10, r17
+       subq r18, r10, r18
+       ldq_u r8, 0(r17)
+unaligned_dest_aligned:
+       subq r18, 1, r10
+       bic r10, 7, r10
+       and r18, 7, r18
+       beq r10, unaligned_partial_left
+unaligned_loop:
+       ldq_u r9, 7(r17)
+       lda r17, 8(r17)
+       extql r8, r17, r12
+       extqh r9, r17, r13
+       subq r10, 8, r10
+       bis r12, r13, r13
+       stq r13, 0(r16)
+       lda r16, 8(r16)
+       beq r10, unaligned_second_partial_left
+       ldq_u r8, 7(r17)
+       lda r17, 8(r17)
+       extql r9, r17, r12
+       extqh r8, r17, r13
+       bis r12, r13, r13
+       subq r10, 8, r10
+       stq r13, 0(r16)
+       lda r16, 8(r16)
+       bne r10, unaligned_loop
+unaligned_partial_left:
+       mov r8, r9
+unaligned_second_partial_left:
+       ldq_u r8, -1(r25)
+       extql r9, r17, r9
+       extqh r8, r17, r8
+       bis r8, r9, r8
+       bne r18, few_left
+       stq_u r8, 0(r16)
+       br r31, finished
+unaligned_few_left:
+       ldq_u r9, -1(r25)
+       extql r8, r17, r8
+       extqh r9, r17, r9
+       bis r8, r9, r8
+       insqh r8, r16, r9
+       insql r8, r16, r8
+       lda r12, -1(r31)
+       mskql r12, r18, r13
+       cmovne r13, r13, r12
+       insqh r12, r16, r13
+       insql r12, r16, r12
+       addq r16, r18, r10
+       ldq_u r14, 0(r16)
+       ldq_u r25, -1(r10)
+       bic r14, r12, r14
+       bic r25, r13, r25
+       and r8, r12, r8
+       and r9, r13, r9
+       bis r8, r14, r8
+       bis r9, r25, r9
+       stq_u r9, -1(r10)
+       stq_u r8, 0(r16)
+finished:
+       hw_rei
diff -r 8e85b6d54396 -r 75379ad2028e system/alpha/palcode/osfpal_cache_copy.s
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/system/alpha/palcode/osfpal_cache_copy.s  Mon May 17 17:18:32 2004 -0400
@@ -0,0 +1,5257 @@
+// modified to use the Hudson style "impure.h" instead of ev5_impure.sdl
+// since we don't have a mechanism to expand the data structures.... pb Nov/95 
        
+
+// build_fixed_image: not sure what means
+// real_mm to be replaced during rewrite
+// remove_save_state  remove_restore_state can be remooved to save space ??
+
+
+#include "ev5_defs.h"
+#include "ev5_impure.h"
+#include "ev5_alpha_defs.h"
+#include "ev5_paldef.h"
+#include "ev5_osfalpha_defs.h"
+#include "fromHudsonMacros.h"
+#include "fromHudsonOsf.h"
+#include "dc21164FromGasSources.h"
+
+#ifdef SIMOS
+#define DEBUGSTORE(c) nop
+#else
+#define DEBUGSTORE(c) \
+       lda     r13, c(zero) ; \
+       bsr     r25, debugstore
+#endif
+        
+#define DEBUG_EXC_ADDR()\
+       bsr     r25, put_exc_addr; \
+       DEBUGSTORE(13)          ; \
+       DEBUGSTORE(10)
+
+#define egore 0
+#define acore 0
+#define beh_model 0
+#define ev5_p2 1
+#define ev5_p1 0
+#define ldvpte_bug_fix 1
+#define osf_chm_fix  0
+       
+// Do we want to do this?? pb  
+#define spe_fix 0
+// Do we want to do this?? pb  
+#define build_fixed_image 0
+       
+#define ev5_pass2      
+#define enable_p4_fixups 0
+#define osf_svmin 1
+#define enable_physical_console 0
+#define fill_err_hack 0
+#define icflush_on_tbix 0
+#define max_cpuid 1
+#define perfmon_debug 0
+#define rawhide_system 0
+#define rax_mode 0
+
+
+// This is the fix for the user-mode super page references causing the machine 
to crash.
+#if (spe_fix == 1) && (build_fixed_image==1)
+#define hw_rei_spe     br      r31, hw_rei_update_spe
+#else  
+#define hw_rei_spe     hw_rei
+#endif 
+       
+
+// redefine a few of the distribution-code names to match the Hudson gas 
names.        
+// opcodes     
+#define ldqp ldq_p
+#define stqp stq_p
+#define ldlp ldl_p
+#define stlp stl_p
+       
+#define r0 $0
+#define r1 $1
+#define r2 $2 
+#define r3 $3 
+#define r4 $4
+#define r5 $5
+#define r6 $6
+#define r7 $7
+#define r8 $8
+#define r9 $9
+#define r10 $10
+#define r11 $11
+#define r12 $12
+#define r13 $13
+#define r14 $14
+#define r15 $15
+#define r16 $16
+#define r17 $17
+#define r18 $18
+#define r19 $19
+#define r20 $20
+#define r21 $21
+#define r22 $22
+#define r23 $23
+#define r24 $24
+#define r25 $25
+#define r26 $26
+#define r27 $27
+#define r28 $28
+#define r29 $29
+#define r30 $30
+#define r31 $31
+
+//     .title  "EV5 OSF PAL" 
+//     .ident  "V1.18"
+//
+//****************************************************************************
+//*                                                                        *
+//*  Copyright (c) 1992, 1993, 1994, 1995                                      
    *
+//*  by DIGITAL Equipment Corporation, Maynard, Mass.                      *
+//*                                                                        *
+//*  This software is furnished under a license and may be used and  copied  *
+//*  only  in  accordance  with  the  terms  of  such  license and with the  *
+//*  inclusion of the above copyright notice.  This software or  any  other  *
+//*  copies  thereof may not be provided or otherwise made available to any  *
+//*  other person.  No title to and ownership of  the  software  is  hereby  *
+//*  transferred.                                                          *
+//*                                                                        *
+//*  The information in this software is subject to change  without  notice  *
+//*  and  should  not  be  construed  as  a commitment by DIGITAL Equipment  *
+//*  Corporation.                                                          *
+//*                                                                        *
+//*  DIGITAL assumes no responsibility for the use or  reliability  of  its  *
+//*  software on equipment which is not supplied by DIGITAL.               *
+//*                                                                        *
+//****************************************************************************
+
+// .sbttl      "Edit History"
+//+
+// Who         Rev     When            What    
+// ------------        ---     -----------     --------------------------------
+// DB          0.0     03-Nov-1992     Start
+// DB          0.1     28-Dec-1992     add swpctx
+// DB          0.2     05-Jan-1993     Bug: PVC found mtpr dtb_CM -> virt ref 
bug
+// DB          0.3     11-Jan-1993     rearrange trap entry points
+// DB          0.4     01-Feb-1993     add tbi
+// DB          0.5     04-Feb-1993     real MM, kludge reset flow, kludge 
swppal
+// DB          0.6     09-Feb-1993     Bug: several stack pushers used r16 for 
pc (should be r14)
+// DB          0.7     10-Feb-1993     Bug: pushed wrong PC (+8) on CALL_PAL 
OPCDEC
+//                                     Bug: typo on register number for store 
in wrunique
+//                                     Bug: rti to kern uses r16 as scratch 
+//                                     Bug: callsys saving wrong value in 
pt_usp
+// DB          0.8     16-Feb-1993     PVC: fix possible pt write->read bug in 
wrkgp, wrusp
+// DB          0.9     18-Feb-1993     Bug: invalid_dpte_handler shifted pte 
twice
+//                                     Bug: rti stl_c could corrupt the stack
+//                                     Bug: unaligned returning wrong value in 
r17 (or should be and)
+// DB          0.10    19-Feb-1993     Add draina, rd/wrmces, cflush, cserve, 
interrupt
+// DB          0.11    23-Feb-1993     Turn caches on in reset flow
+// DB          0.12    10-Mar-1993     Bug: wrong value for icsr for FEN in 
kern mode flow
+// DB          0.13    15-Mar-1993     Bug: wrong value pushed for PC in 
invalid_dpte_handler if stack push tbmisses
+// DB          0.14    23-Mar-1993     Add impure pointer paltemp, reshuffle 
some other paltemps to match VMS
+// DB          0.15    15-Apr-1993     Combine paltemps for WHAMI and MCES
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to