registers

Java equivalent of register int?

In C, I can allocate a register for a variable, for example: register int i = 0; I am aware that Java is an interpreted language, and is many many abstractions away from the CPU. Is there any mechanism available to even request (and if the architecture doesn't allow it, so what) that my variable remains in a register instead of movin...

Register level programming of GMA 950 hardware

I'm trying to write a basic driver for the GMA 950 hardware. I've been looking for a datasheet or some programming guide but cannot find anything. I've also looked at the Linux and FreeBSD source but they are quite large and will take time to understand. The GMA 950 is associated with an Intel 945 Express chipset. Does anyone know of...

Callee save with the caller passing the used registers?

In compiler design, why instead of having a caller or callee register saving arrangement, couldn't the caller pass its list of used registers (that it would push in case of a caller saving arrangement) to the callee so that the callee can compare its list of used registers to the registers used by the caller. Then only the registers that...

Terminology: "registers" in assembly language programming

I've heard the terminologies: register, hardware register, program register,register file. What's the difference between all these? And in assebmly, what is the type of the EAX register? Program register? ...

Storing values in HI and LO registers of MIPS

Hello, I am writing certain code in MIPS and I've come to the point where the requirement is to store the result, temporarily, in HI and LO special registers (both are 8 bytes wide). These instructions are at my disposal: divu s,t lo <-- s div t ; hi <-- s mod t multu s,t hi / lo < -- s * t ; So, divu stores result of divisi...

Is there a relation between integer and register sizes?

Recently, I was challenged in a recent interview with a string manipulation problem and asked to optimize for performance. I had to use an iterator to move back and forth between TCHAR characters (with UNICODE support - 2bytes each). Not really thinking of the array length, I made a curial mistake with not using size_t but an int to it...

Copy from one register to another - VIM

How to copy the contents of one register to another without pasting on clip board? I'd yanked one text and it got yanked in the default " register. Now i wan't to copy another text without deleting/overwriting " register. So I wan't to move the contents of " register to say some a or b register so that I can copy the new text inside ". H...

Building interference graph

How can I build an interference graph so I may use it in register allocation ? How do I determine live-ranges? ...

Vim Register Use in Ex Mode

Potentially 2 questions in one. I would like to know how to reference a register in Ex mode. For instance, I'm editing a file and I want to save the file with a timestamp (or just datestamp really) appended to it. I know I can set register to the value of a shell commands output using: :let @a = system("date +\"%Y-%m-%d\"") Is ther...

assembly registers beginner

So I've been getting into a bit of assembly lately and I'm a beginner so i was wondering if someone could clarify something. I take it every process has it's own set of registers, and each thread can modify these registers right?. How then do multiple threads use the same registers without causing clashes? Or does each thread have its ow...

How can we get Function name from Spack Pointer(reg/SP) on Linux?

Hi, i am using ptrace to get information related to Callstack on Linux. i can retrieve Spack Pointer to my stack using register returned by ptarces. but using this stack pointer how can i retrieve information related to Function name and signature of current call stack? are there any Linux APIs to traverse this callstack? please help....

How to correctly calculate address spaces?

Below is an example of a question given on my last test in a Computer Engineering course. Anyone mind explaining to me how to get the start/end addresses of each? I have listed the correct answers at the bottom... The MSP430F2410 device has an address space of 64 KB (the basic MSP430 architecture). Fill in the table below if we know ...

testing if a register equals itself in ia32

(ia32) for example, test $eax, $eax why would you ever want to do that? it does $eax & $eax, right? shouldn't this always set the flag register to say that they are equal..? addendum: so test will set the ZF (as mentioned below) if the register is zero. so is test (as used above) mainly just used to tell if a register is empty? and Z...

Most Efficient way to set Register to 1 or (-1)

I am taking an assembly course now, and the guy who checks our home assignments is a very pedantic old-school optimization freak. For example he deducts 10% if he sees: mov ax, 0 instead of: xor ax,ax even if it's only used once. I am not a complete beginner in assembly programing but I'm not an optimization expert, so I need yo...

How does a computer use just a few registers?

I know a little about assembly, and that there are 4 or 8 or so general purpose registers. How do all the programs on a computer work with just that amount of registers, especially with multithreading and everything? ...

ARM NEON: What's the difference between vld4_f32 and vld4q_f32?

Hi Guys, I'm not in a position to make out the difference between vld4_f32 and vld4q_f32 in ARM NEON instructions. The confusion started when I raised my coding levels and started looking at the assembly instructions rather than the less informative intrinsics. The reason I need to use vld4 variant instruction here is because, I would...

Analysis of C code

Hello! Here is function that i am writing on 64 bit linux machine. void myfunc(unsigned char* arr) //array of 8 bytes is passed by reference { unsigned long a = 0; //8 bytes unsigned char* LL = (unsigned char*) &a; LL[0] = arr[6]; LL[1] = arr[3]; LL[2] = arr[1]; LL[3] = arr[7]; LL[4] = arr[5]; LL[5] = arr[4]; ...

What x86 register denotes source location in movsb instruction?

What x86 register denotes source location in movsb instruction? ...