📄 fpsymbol.h
字号:
.endif;; .if $narg >=3 .err .print "cp_write_inst: too many parameters" .exitm .endif; .endm;;;;;;;============================================================================; MACRO NAME: cp_advance_temps;; WRITTEN BY: Bob Perlman;; MOST RECENT UPDATE: April 17, 1988;; FUNCTION: Transfers the contents of Am29027 registers R-Temp, S-Temp,; and I-Temp to register R, register S, and the instruction; register, respectively.;; PARAMETERS: none;; USAGE:;; cp_advance_temps;;;;============================================================================; .macro cp_advance_temps;; .if $narg!=0 .err .print "cp_advance_temp: takes no parameters" .else store 1,CP_ADV_TEMPS,gr1,0 ; use gr1 because it's never protected .endif; .endm;;;;;============================================================================; MACRO NAME: cp_write_mode;; WRITTEN BY: Bob Perlman;; MOST RECENT UPDATE: April 17, 1988;; FUNCTION: Transfers a 64-bit mode specification to the Am29027 mode; register;; PARAMETERS:; reg - the Am29000 g.p. register containing the 32 MSBs of the; 64-bit mode specification to be transferred.;; LSB_reg - the Am29000 g.p. register containing the 32 LSBs of the; 64-bit mode specification to be transferred.;; USAGE:;; cp_write_mode reg [,LSB_reg];; Either of two forms is acceptable:;; cp_write_mode reg; or cp_write_mode reg, LSB_reg;; If LSB_reg is omitted, the LSBs are taken from the next g.p.; register.;; Ex: cp_write_mode lr2 Transfers the contents of lr2 to; the most-significant half of the Am29027; mode register, and the contents of lr3; to the least-significant half.;; cp_write_mode lr2,lr5 Transfers the contents of lr2 to; the most-significant half of the Am29027; mode register, and the contents of lr5; to the least-significant half.;;;;============================================================================; .macro cp_write_mode,p1,p2; .if $narg==0 .err .print "cp_write_mode: missing parameter(s)" .endif;; .if $narg==1 store 1,CP_WRITE_MODE,%%((&p1)+1),p1 .exitm .endif;; .if $narg==2 store 1,CP_WRITE_MODE,p2,p1 .exitm .endif;; .if $narg>=3 .err .print "cp_write_mode: too many parameters" .endif; .endm;;;;============================================================================; MACRO NAME: cp_read_dp;; WRITTEN BY: Bob Perlman;; MOST RECENT UPDATE: April 17, 1988;; FUNCTION: Transfers the current Am29027 double-precison floating-point; result to the Am29000;; PARAMETERS:; reg - the Am29000 g.p. register into which the 32 MSBs of the; current Am29027 result are to be written.;; LSB_reg - the Am29000 g.p. register into which the 32 LSBs of the; current Am29027 result are to be written.;; NO_ERR - indicates that exception reporting is to be suppressed for this; transfer.;; USAGE:;; cp_read_dp reg [,LSB_reg] [,START];; Either of two forms is acceptable:;; cp_read_dp reg; or cp_read_dp reg, LSB_reg;; If LSB_reg is omitted, the LSBs are written to the next g.p. register.;; Ex: cp_read_dp lr2 Transfers the 32 MSBs of the current; Am29027 result to lr2, and the 32 LSBs; to lr3.;; cp_read_dp lr2,lr5 Transfers the 32 MSBs of the current; Am29027 result to lr2, and the 32 LSBs; to lr5.;; Exception reporting can be suppressed by appending NO_ERR to either; of the above, e.g.:;; cp_read_dp lr2,NO_ERR; cp_read_dp lr2,lr5,NO_ERR;;;============================================================================; .macro cp_read_dp,p1,p2,p3; .if $narg==0 .err .print "cp_read_dp: missing parameter(s)" .endif;; .if $narg==1 load 1,CP_READ_LSBS,%%((&p1)+1),0 load 1,CP_READ_MSBS,p1,0 .exitm .endif;; .if $narg==2; .ifeqs "@p2@","NO_ERR" load 1,CP_READ_LSBS|CP_NO_ERR,%%((&p1)+1),0 load 1,CP_READ_MSBS|CP_NO_ERR,p1,0 .exitm .endif; load 1,CP_READ_LSBS,p2,0 load 1,CP_READ_MSBS,p1,0 .exitm; .endif;; .if $narg==3; .ifeqs "@p3@","NO_ERR" load 1,CP_READ_LSBS|CP_NO_ERR,p2,0 load 1,CP_READ_MSBS|CP_NO_ERR,p1,0 .else .err .print "cp_read_dp: bad parameter list" .endif .exitm; .endif;; .if $narg>=4 .err .print "cp_read_dp: too many parameters" .endif; .endm;;;;============================================================================; MACRO NAME: cp_read_sp;; WRITTEN BY: Bob Perlman;; MOST RECENT UPDATE: April 17, 1988;; FUNCTION: Transfers the current Am29027 single-precison floating-point; result to the Am29000;; PARAMETERS:; reg - the Am29000 g.p. register into which the current Am29027; result is to be written.;; NO_ERR - indicates that exception reporting is to be suppressed for this; transfer.;; USAGE:;; cp_read_sp reg [,START];; Ex: cp_read_sp lr2 Transfers the current Am29027 result; to lr2.;; cp_read_sp lr2,NO_ERR Transfers the current Am29027 result; to lr2, and suppresses exception; reporting for this transfer.;;;============================================================================; .macro cp_read_sp,p1,p2; .if $narg==0 .err .print "cp_read_sp: missing parameter(s)" .endif;; .if $narg==1 load 1,CP_READ_MSBS,p1,0 .exitm .endif;; .if $narg==2; .ifeqs "@p2@","NO_ERR" load 1,CP_READ_MSBS|CP_NO_ERR,p1,0 .else .err .print "cp_read_sp: bad parameter list" .endif .exitm; .endif;; .if $narg>=3 .err .print "cp_read_sp: too many parameters" .endif; .endm;;;;============================================================================; MACRO NAME: cp_read_int;; WRITTEN BY: Bob Perlman;; MOST RECENT UPDATE: April 17, 1988;; FUNCTION: Transfers the current Am29027 integer result to the Am29000;; PARAMETERS:; reg - the Am29000 g.p. register into which the current Am29027; result is to be written.;; NO_ERR - indicates that exception reporting is to be suppressed for this; transfer.;; USAGE:;; cp_read_int reg [,START];; Ex: cp_read_int lr2 Transfers the current Am29027 result; to lr2.;; cp_read_int lr2,NO_ERR Transfers the current Am29027 result; to lr2, and suppresses exception; reporting for this transfer.;;;============================================================================; .macro cp_read_int,p1,p2; .if $narg==0 .err .print "cp_read_int: missing parameter(s)" .endif;; .if $narg==1 load 1,CP_READ_LSBS,p1,0 nop ; leave a cycle for the MSBs to come out .exitm .endif;; .if $narg==2; .ifeqs "@p2@","NO_ERR" load 1,CP_READ_LSBS|CP_NO_ERR,p1,0 nop ; leave a cycle for the MSBs to come out .else .err .print "cp_read_int: bad parameter list" .endif .exitm; .endif;; .if $narg>=3 .err .print "cp_read_int: too many parameters" .endif; .endm;;;;============================================================================; MACRO NAME: cp_read_flags;; WRITTEN BY: Bob Perlman;; MOST RECENT UPDATE: April 17, 1988;; FUNCTION: Transfers the contents of the Am29027 flag register; to the Am29000;; PARAMETERS:; reg - the Am29000 g.p. register into which the current Am29027; flag register contents are to be written.;; NO_ERR - indicates that exception reporting is to be suppressed for this; transfer.;; USAGE:;; cp_read_flags reg [,START];; Ex: cp_read_flags lr2 Transfers the Am29027 flag register; contents to lr2.;; cp_read_flags lr2,NO_ERR Transfers the Am29027 flag register; contents to lr2, and suppresses; exception reporting for this; transfer.;;;============================================================================; .macro cp_read_flags,p1,p2; .if $narg==0 .err .print "cp_read_flags: missing parameter(s)" .endif;; .if $narg==1 load 1,CP_READ_FLAGS,p1,0 .exitm .endif;; .if $narg==2;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -