Lines Matching defs:storage

14 #include "storage.h"
285 static const char *show_memop(struct storage *storage)
289 if (!storage)
291 switch (storage->type) {
293 sprintf(buffer, "%d(FP)", storage->offset);
296 sprintf(buffer, "%d(SP)", storage->offset);
299 return hardregs[storage->regno].name;
301 return show_storage(storage);
313 static void alloc_stack(struct bb_state *state, struct storage *storage)
315 storage->type = REG_STACK;
316 storage->offset = alloc_stack_offset(4);
337 if (in && in->storage->type != REG_REG)
349 struct storage *storage;
361 storage = out->storage;
362 switch (storage->type) {
370 storage = out->storage;
373 alloc_stack(state, storage);
376 output_insn(state, "movl %s,%s", hardreg->name, show_memop(storage));
381 /* Flush a hardreg out to the storage it has.. */
416 * If we found output storage, it had better be local stack
419 if (src->storage->type != REG_STACK)
425 * Incoming pseudo with out any pre-set storage allocation?
430 if (src->storage->type == REG_UDEF) {
432 src->storage->type = REG_REG;
433 src->storage->regno = reg - hardregs;
436 alloc_stack(state, src->storage);
468 struct storage *storage = dst->storage;
469 if (storage->type == REG_REG)
470 return hardregs + storage->regno;
541 static void flush_pseudo(struct bb_state *state, pseudo_t pseudo, struct storage *storage)
605 switch (src->storage->type) {
611 alloc_stack(state, src->storage);
615 flush_pseudo(state, pseudo, src->storage);
616 output_insn(state, "leal %s,%s", show_memop(src->storage), hardreg->name);
632 output_insn(state, "mov.%d %s,%s", 32, show_memop(src->storage), hardreg->name);
737 struct storage *src;
771 src = hash->storage;
1466 static void write_reg_to_storage(struct bb_state *state, struct hardreg *reg, pseudo_t pseudo, struct storage *storage)
1471 switch (storage->type) {
1473 out = hardregs + storage->regno;
1480 storage->type = REG_REG;
1481 storage->regno = reg - hardregs;
1492 storage->type = REG_REG;
1493 storage->regno = i;
1499 alloc_stack(state, storage);
1502 output_insn(state, "movl %s,%s", reg->name, show_memop(storage));
1507 static void write_val_to_storage(struct bb_state *state, pseudo_t src, struct storage *storage)
1511 switch (storage->type) {
1513 alloc_stack(state, storage);
1515 output_insn(state, "movl %s,%s", show_pseudo(src), show_memop(storage));
1518 out = hardregs + storage->regno;
1523 static void fill_output(struct bb_state *state, pseudo_t pseudo, struct storage *out)
1557 /* Do we have it in another storage? */
1567 *out = *in->storage;
1570 output_insn(state, "movl %s,%s", show_memop(in->storage), hardregs[out->regno].name);
1573 if (out == in->storage)
1575 if ((out->type == in->storage->type) && (out->regno == in->storage->regno))
1577 output_insn(state, "movl %s,%s", show_memop(in->storage), show_memop(out));
1586 struct storage *out;
1591 * storage for it..
1596 out = hash->storage;
1642 * live on exit into the proper storage
1650 struct storage *out = entry->storage;
1679 fill_output(state, entry->pseudo, entry->storage);
1697 struct storage *storage = entry->storage;
1698 const char *name = show_storage(storage);
1700 if (storage->type == REG_REG) {
1701 int regno = storage->regno;
1717 output_comment(state, "%s <- %s", show_pseudo(entry->pseudo), show_storage(entry->storage));
1721 output_comment(state, "%s <-> %s", show_pseudo(entry->pseudo), show_storage(entry->storage));
1725 output_comment(state, "%s -> %s", show_pseudo(entry->pseudo), show_storage(entry->storage));
1757 struct storage *s = entry->storage;
1820 struct storage *in = lookup_storage(entry->bb, arg, STOR_IN);
1846 * Set up storage information for "return"
1858 struct storage *out = lookup_storage(bb, pseudo, STOR_OUT);
1869 * Set up dummy/silly output storage information for a switch
1877 struct storage *out = lookup_storage(bb, pseudo, STOR_OUT);
1890 /* Argument storage etc.. */
1920 /* Set up initial inter-bb storage links */
1923 /* Architecture-specific storage rules.. */
1929 /* Clear the storage hashes for the next function.. */