1988-06-22 16:57:09 +00:00
|
|
|
/*
|
|
|
|
* Sources of the "STORE" group instructions
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* $Header$ */
|
|
|
|
|
|
|
|
#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"
|
|
|
|
|
1990-06-21 12:16:31 +00:00
|
|
|
DoSTL(l)
|
|
|
|
register long l;
|
1988-06-22 16:57:09 +00:00
|
|
|
{
|
|
|
|
/* STL l: Store local or parameter */
|
|
|
|
|
1990-06-21 12:16:31 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
1990-06-21 12:16:31 +00:00
|
|
|
DoSTE(arg)
|
|
|
|
register unsigned long arg;
|
1988-06-22 16:57:09 +00:00
|
|
|
{
|
|
|
|
/* STE g: Store external */
|
1990-06-21 12:16:31 +00:00
|
|
|
register ptr p = i2p(arg);
|
1988-06-22 16:57:09 +00:00
|
|
|
|
1990-06-21 12:16:31 +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
|
|
|
}
|
|
|
|
|
1990-06-21 12:16:31 +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 */
|
|
|
|
|
1990-06-21 12:16:31 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
1990-06-21 12:16:31 +00:00
|
|
|
DoSTF(l)
|
|
|
|
register long l;
|
1988-06-22 16:57:09 +00:00
|
|
|
{
|
|
|
|
/* STF f: Store offsetted */
|
|
|
|
register ptr p = dppop();
|
|
|
|
|
1990-06-21 12:16:31 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
1990-06-21 12:16:31 +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();
|
|
|
|
|
1990-06-21 12:16:31 +00:00
|
|
|
LOG(("@S6 DoSTI(%ld)", l));
|
1988-06-22 16:57:09 +00:00
|
|
|
spoilFRA();
|
|
|
|
pop_m(p, arg_o(l));
|
|
|
|
}
|
|
|
|
|
1990-06-21 12:16:31 +00:00
|
|
|
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;
|
|
|
|
|
1990-06-21 12:16:31 +00:00
|
|
|
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));
|
|
|
|
}
|
|
|
|
|
1990-06-21 12:16:31 +00:00
|
|
|
DoSDL(l)
|
|
|
|
register long l;
|
1988-06-22 16:57:09 +00:00
|
|
|
{
|
|
|
|
/* SDL l: Store double local or parameter */
|
|
|
|
|
1990-06-21 12:16:31 +00:00
|
|
|
LOG(("@S6 DoSDL(%ld)", l));
|
1988-06-22 16:57:09 +00:00
|
|
|
spoilFRA();
|
|
|
|
l = arg_l(l);
|
|
|
|
pop_st(loc_addr(l), dwsize);
|
|
|
|
}
|
|
|
|
|
1990-06-21 12:16:31 +00:00
|
|
|
DoSDE(arg)
|
|
|
|
register unsigned long arg;
|
1988-06-22 16:57:09 +00:00
|
|
|
{
|
|
|
|
/* SDE g: Store double external */
|
1990-06-21 12:16:31 +00:00
|
|
|
register ptr p = i2p(arg);
|
1988-06-22 16:57:09 +00:00
|
|
|
|
1990-06-21 12:16:31 +00:00
|
|
|
LOG(("@S6 DoSDE(%lu)", p));
|
1988-06-22 16:57:09 +00:00
|
|
|
spoilFRA();
|
|
|
|
pop_m(arg_g(p), dwsize);
|
|
|
|
}
|
|
|
|
|
1990-06-21 12:16:31 +00:00
|
|
|
DoSDF(l)
|
|
|
|
register long l;
|
1988-06-22 16:57:09 +00:00
|
|
|
{
|
|
|
|
/* SDF f: Store double offsetted */
|
|
|
|
register ptr p = dppop();
|
|
|
|
|
1990-06-21 12:16:31 +00:00
|
|
|
LOG(("@S6 DoSDF(%ld)", l));
|
1988-06-22 16:57:09 +00:00
|
|
|
spoilFRA();
|
|
|
|
pop_m(p + arg_f(l), dwsize);
|
|
|
|
}
|