[ixp1200] using addresses of labels

Arthur Berkovitch arthur at comgates.co.il
Wed May 14 03:33:41 EDT 2003


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.cs.princeton.edu/mailman/private/ixp1200/attachments/20030514/45dcdb4f/attachment.htm


More information about the ixp1200 mailing list