VEX assembly directives

Usage of VEX tools

VEX assembly directives

Postby Ashu » Tue Sep 12, 2006 7:31 am

From where I can fetch some help on VEX assembly directives ?

thanks,
Ashu
Ashu
 
Posts: 7
Joined: Thu Jul 13, 2006 1:28 pm
Location: Noida, India

Postby frb » Wed Sep 13, 2006 10:38 pm

Could you make some examples of what you have in mind for "assembly directives"? If you want to insert assembly code directly from "C", this is not supported by the VEX compiler.
-- Paolo
frb
 
Posts: 62
Joined: Thu Nov 12, 2009 3:44 pm

Postby Ashu » Tue Sep 19, 2006 9:26 am

Nops....I don't want to insert assembly through C, but I want to manually write some stand-alone assembly code. And, I 'm not clear with some of the directives, which are there in generated code. Thus I need some help on same (if there's some documentation).

thanks,
Ashu
Ashu
 
Posts: 7
Joined: Thu Jul 13, 2006 1:28 pm
Location: Noida, India

Postby frb » Tue Sep 19, 2006 9:38 am

Many of the assembly directive should be fairly obvious. If you provide a list of what you don't understand, I can add some explanation.
frb
 
Posts: 62
Joined: Thu Nov 12, 2009 3:44 pm

Postby Ashu » Wed Sep 20, 2006 7:47 am

1. Can you help me interpret the .equ directive and also significance of question marks in labels, variable names (in data section) ?

.equ ?2.1?2scratch.0, 0x0
.equ _?1PACKET.5, 0x10

_?1STRINGPACKET.7:

2. Also, How the move instruction is able to move a 32 bit number ? (ISA is 32 bit)
Is mov a macro that will get bifurcated, later?
c0 mov $r0.3 = (_?1STRINGPACKET.7 + 0) ## addr(_?1STRINGVAR.7)(P32)
Ashu
 
Posts: 7
Joined: Thu Jul 13, 2006 1:28 pm
Location: Noida, India

Postby frb » Wed Sep 20, 2006 9:07 am

Well, I guess that obvious to me doesn't mean obvious to everyone :?

Here are some simple answer

.equ means "equal', it just assigns a load-time constant to a symbol. Pretty much every asm syntax I've ever seen has a similar concept

symbols can include characters (?., etc.) that wouldn't be valid for "C" symbols; it's a simple way to avoid namespace pollution

Why shouldn't a 32-bit ISA be able to do a 32-bit move (which really is a "copy" operation)? Are you worried about how to assign 32-bit immediates? In that case, because VEX is a VLIW instruction set, in a 4-issue machine you have 128 bits to play with (borrowing from adjacent slots), so there's plenty of space to encode long immediates. The book has a lengthy explanation about it, so instead of rewriting it here, I'll just point you to that...
frb
 
Posts: 62
Joined: Thu Nov 12, 2009 3:44 pm

Postby Ashu » Wed Sep 20, 2006 9:34 am

Well yeah! .equ is quite common & obvious, I was confused with the wierd way of naming the symbols (never came across symbol names with question marks)...but as you said, its a good way of avoiding namespace issues...

Regarding the 32 bit immed moves: These moves are being generated by the compiler, when the machine conf. is of a simple risc one, thus no spare slot to fit the immed. separately ?

thanks..
Ashu
 
Posts: 7
Joined: Thu Jul 13, 2006 1:28 pm
Location: Noida, India

Postby frb » Wed Sep 20, 2006 9:51 am

The VEX machine model always needs at least 2 slots; then, the compiler can be constrained to issue only 1 op per instruction. Strictly speaking, no VEX model would fit into a 32-bit encoding format, but you can approximate the performance of a scalar machine by tricking the compiler to avoid allocating an instruction in the 2nd slot.
frb
 
Posts: 62
Joined: Thu Nov 12, 2009 3:44 pm

Re: _impure_ptr

Postby frb » Wed Jan 03, 2007 9:15 am

impure_ptr points to a struct that holds most shared data across threads, which is necessary for reentrancy. See newlib documentation for details.

comm data should be initialized
frb
 
Posts: 62
Joined: Thu Nov 12, 2009 3:44 pm


Return to VEX Tools



Who is online

Users browsing this forum: No registered users and 5 guests

cron