OpenCores
URL https://opencores.org/ocsvn/ssbcc/ssbcc/trunk

Subversion Repositories ssbcc

[/] [ssbcc/] [trunk/] [core/] [9x8/] [macros/] [fetchoffset.py] - Diff between revs 3 and 5

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 3 Rev 5
Line 19... Line 19...
                                   ['','singlevalue','symbol']
                                   ['','singlevalue','symbol']
                                 ]);
                                 ]);
 
 
  # Define the macro functionality.
  # Define the macro functionality.
  def emitFunction(ad,fp,argument):
  def emitFunction(ad,fp,argument):
    name = argument[0]['value'];
    (addr,ixBank,bankName) = ad.Emit_GetAddrAndBank(argument[0]);
    (addr,ixBank,bankName) = ad.Emit_GetAddrAndBank(name);
 
    offset = ad.Emit_EvalSingleValue(argument[1]);
    offset = ad.Emit_EvalSingleValue(argument[1]);
    ad.EmitPush(fp,addr+offset,ad.Emit_String('%s+%s' % (name,offset,)),argument[0]['loc']);
    ad.EmitPush(fp,addr+offset,ad.Emit_String('%s+%s' % (argument[0]['value'],offset,)),argument[0]['loc']);
    ad.EmitOpcode(fp,ad.specialInstructions['fetch'] | ixBank,'fetch '+bankName);
    ad.EmitOpcode(fp,ad.specialInstructions['fetch'] | ixBank,'fetch '+bankName);
 
 
  ad.EmitFunction['.fetchoffset'] = emitFunction;
  ad.EmitFunction['.fetchoffset'] = emitFunction;
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.