[ixp1200] using addresses of labels

Cyrus Hall hallcp at cs.colorado.edu
Thu May 22 21:23:12 EDT 2003


Sorry to have such an extended reply time, but I've just now gotten to
the point where I'm in need of another small pointer.  I've messed
around with jump for the last week with little success, and rtn seems to
require use of the .func_table directive.  But the documentation for
.func_table and .export_func amounts to a single paragraph a piece and I
can't find a place either one is used in the code provided with the
ENP2505.  Do you by change have a small snippet of example code?

My biggest issue with all the methods I've tried: there seems to be no
way to setup a function address and then jump to it at run time.  Now,
since one can't self modify the ucode store, this wouldn't seem to be
needed, but it would sure make my life during debugging a hell of a lot
easier.  Any suggestions?

thanks,
Cy

On Wed, 2003-05-14 at 01:33, Arthur Berkovitch wrote:
> Hi Cyrus,
> Use the JUMP instruction:
> 
> jump[register, label#], targets [label1, label2, ...labeln], optional_token
> 
> Also, you may find the .func_table directive useful for your needs.
> If wanted, you can export the labels addresses to core applications with the
> .export_func directive.
> take care,
> Arthur
> 
> -----Original Message-----
> From: Cyrus Hall [mailto:hallcp at cs.colorado.edu]
> Sent: Wednesday, May 14, 2003 1:28 AM
> To: ixp1200 List
> Subject: [ixp1200] using addresses of labels
> 
> 
> Hi there all-
> 
> I'm currently trying to build a table of address to parts of a filter
> I've written.  IE, you have a value, index into the table, and jump to
> the associated address in code.  The jumping is simple enough, save the
> PC and replace it, give up control, and wait for the ctx switch back
> in.  Not hyper efficient, but not bad when you're only filter one or two
> fields.   Returning is simple enough as well.
> 
> The problem I'm having is actually get the address of code.  This
> clearly needs to be done at compile time (there doesn't appear to be a
> linker involved in loading code onto the ME's), and would seem to be as
> simple as replacing the symbolic label with it's final address.  Yet,
> there seems to be no way to do something like:
> 
> immed32[var, label#:]
> 
> Has anyone done anything like this and\or know how?
> 
> Thanks,
> Cyrus





More information about the ixp1200 mailing list