ack/util/int/do_store.c

116 lines
1.8 KiB
C
Raw Normal View History

1988-06-22 16:57:09 +00:00
/*
* Sources of the "STORE" group instructions
*/
1994-06-24 11:31:16 +00:00
/* $Id$ */
1988-06-22 16:57:09 +00:00
#include <em_abs.h>
#include "global.h"
#include "log.h"
#include "mem.h"
#include "trap.h"
#include "text.h"
#include "fra.h"
#include "warn.h"
DoSTL(l)
register long l;
1988-06-22 16:57:09 +00:00
{
/* STL l: Store local or parameter */
LOG(("@S6 DoSTL(%ld)", l));
1988-06-22 16:57:09 +00:00
spoilFRA();
l = arg_l(l);
1989-11-22 13:38:37 +00:00
popw_st(loc_addr(l));
1988-06-22 16:57:09 +00:00
}
DoSTE(arg)
register unsigned long arg;
1988-06-22 16:57:09 +00:00
{
/* STE g: Store external */
register ptr p = i2p(arg);
1988-06-22 16:57:09 +00:00
LOG(("@S6 DoSTE(%lu)", p));
1988-06-22 16:57:09 +00:00
spoilFRA();
1989-11-22 13:38:37 +00:00
popw_m(arg_g(p));
1988-06-22 16:57:09 +00:00
}
DoSIL(l)
register long l;
1988-06-22 16:57:09 +00:00
{
/* SIL l: Store into word pointed to by l-th local or parameter */
LOG(("@S6 DoSIL(%ld)", l));
1988-06-22 16:57:09 +00:00
spoilFRA();
l = arg_l(l);
1989-11-22 13:38:37 +00:00
popw_m(st_lddp(loc_addr(l)));
1988-06-22 16:57:09 +00:00
}
DoSTF(l)
register long l;
1988-06-22 16:57:09 +00:00
{
/* STF f: Store offsetted */
register ptr p = dppop();
LOG(("@S6 DoSTF(%ld)", l));
1988-06-22 16:57:09 +00:00
spoilFRA();
1989-11-22 13:38:37 +00:00
popw_m(p + arg_f(l));
1988-06-22 16:57:09 +00:00
}
DoSTI(l)
register size l;
1988-06-22 16:57:09 +00:00
{
/* STI o: Store indirect o bytes (pop address, then data) */
register ptr p = dppop();
LOG(("@S6 DoSTI(%ld)", l));
1988-06-22 16:57:09 +00:00
spoilFRA();
pop_m(p, arg_o(l));
}
DoSTS(l)
register size l;
1988-06-22 16:57:09 +00:00
{
/* STS w: Store indirect, w-byte integer on top of stack gives object size */
register ptr p;
LOG(("@S6 DoSTS(%ld)", l));
1988-06-22 16:57:09 +00:00
spoilFRA();
l = upop(arg_wi(l));
p = dppop();
pop_m(p, arg_o(l));
}
DoSDL(l)
register long l;
1988-06-22 16:57:09 +00:00
{
/* SDL l: Store double local or parameter */
LOG(("@S6 DoSDL(%ld)", l));
1988-06-22 16:57:09 +00:00
spoilFRA();
l = arg_l(l);
pop_st(loc_addr(l), dwsize);
}
DoSDE(arg)
register unsigned long arg;
1988-06-22 16:57:09 +00:00
{
/* SDE g: Store double external */
register ptr p = i2p(arg);
1988-06-22 16:57:09 +00:00
LOG(("@S6 DoSDE(%lu)", p));
1988-06-22 16:57:09 +00:00
spoilFRA();
pop_m(arg_g(p), dwsize);
}
DoSDF(l)
register long l;
1988-06-22 16:57:09 +00:00
{
/* SDF f: Store double offsetted */
register ptr p = dppop();
LOG(("@S6 DoSDF(%ld)", l));
1988-06-22 16:57:09 +00:00
spoilFRA();
pop_m(p + arg_f(l), dwsize);
}