! .text
! .asciz ident "%Z%%M% %I% %E% SMI"
! .align 4
! .seg "text"
!
!
!
!
!
!
!
!
.file "misalign.s"
#include <SYS.h>
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
!
! int ld_int(p)
! char *p;
! {
! /*
! * load 32-bit int from misaligned address
! * cost(16-bit aligned case): 9 cycles
! * cost(8-bit aligned case): 18 cycles
! */
! }
!
!
1:
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
!
! float ld_float(p)
! char *p;
! {
! /* load 32-bit float (not double!) from misaligned address */
! }
!
be,a 1f
!
b 2f
1:
2:
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
!
! double ld_double(p)
! char *p;
! {
! /* load 64-bit float from misaligned address */
! }
!
!
!
2:
1:
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
!
! int st_int(x,p)
! int x;
! char *p;
! {
! /* store 32-bit int from misaligned address;
! return stored value */
! }
!
be,a 1f
!
1:
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
!
! float st_float(x,p)
! float x;
! char *p;
! {
! /* store 32-bit float from misaligned address;
! return stored value */
! }
!
!
1:
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
!
! double st_double(x,p)
! double x;
! char *p;
! {
! /* store 64-bit float from misaligned address;
! return stored value */
! }
!
!
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
!
! void st_float_foreff(x,p)
! float x;
! char *p;
! {
! /* store 32-bit float from misaligned address */
! }
!
be,a 1f
!
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
!
! void st_double_foreff(x,p)
! double x;
! char *p;
! {
! /* store 64-bit float from misaligned address;
! return stored value */
! }
!
!
!