Questions tagged [immediate-operand]

The tag has no usage guidance.

0votes
0answers
22views

XOR operand type mismatch [duplicate]

I'm trying to get around some input character restrictions by encrypting some data. However, when i try and XOR rbx back to my desired value I get an error stating operand mismatch. Am i missing ...
0votes
3answers
47views

Understanding address assignment to registers via assembly instructions

If I have a CPU/system with the following characteristics... 16 bit architecture (16 bit registers and bus) 8 total registers A set of 64 assembly instructions And assuming my assembly instructions ...
5votes
0answers
91views

Why does SSE/AVX lack loading an immediate value?

As far as I know, there is no instruction in SSE/AVX for loading an immediate. One workaround is loading a value to a normal register and movd, but compilers seem to think this is more costly than ...
  • 1,643
0votes
1answer
55views

RISC-V U-Format instruction immediate confusion

Reading the RISC-V unprivileged specification I see that U-format instructions (lui,..) are defined like so: But the immediate value doesn't make sense to me here: specifically, if given an ...
0votes
1answer
63views

What are the common ways instruction decoders deal with using constants over registers in microcontrollers? [closed]

Specifically, if the assembly instruction has a constant as one of the operands, how would instruction decoder pass it to the ALU? So far I thought of three ways to do it. Pass the constant into a ...
0votes
1answer
36views

ARMv7 T3 encoding for adds

I can't tell how to determine the following: i, 10th bit on the left. imm3, what's the difference for this one with imm8?
  • 1,686
1vote
1answer
89views

Replace `movss xmm0, cs:dword_5B27420` with `movss xmm0, immediate`

I have a linux .so file in Ida Pro and I have the following instruction: movss xmm0, cs:dword_5B27420 Is it possible to move a fixed value into xmm0 using the same or less number of bytes than that ...
0votes
1answer
48views

MIPS - SPIM parser immediate value out of range for bitwise ANDI

Was trying to test my program with SPIM and have this message spim: (parser) immediate value (-16) out of range (0 .. 65535) on line 56 of file code1.a andi $t1, $t0, 0xfffffff0 what could be the ...
0votes
0answers
42views

How to mov a 64-bit binary literal into rax? error A2071: initializer magnitude too large for specified size

Here is my code. If I half the size of the binary value to 32-bits, it works, but as soon as I try 33 bits or higher, I get "error A2071: initializer magnitude too large for specified size" ...
0votes
2answers
783views

immediate value encoding in ARM assembly

I'm learning about assembly language right now and I'm a bit confused about how the immediate values are encoded. Can someone explain why the following values are valid: 0xff00ff00, 0xffffffff, ...
1vote
2answers
242views

Why do 32-bit immediates with IMUL give warnings in NASM and errors in GCC?

I am currently investigating some strange behaviour with the imul instruction, because the official Intel manual seems to differ slightly from reality. The first thing I noticed is that the Intel ...
-1votes
2answers
106views

Comparing word against immediate value?

I'm struggling to grasp how to manipulate/compare data stored in registers (words/half-words/intermediate values) in MIPS. Does it matter if they each represent a different number of bytes? For ...
0votes
1answer
81views

Error while compiling MOV instruction in ARM assembly

I am using RVDS6_13 compiler and my processor is Cortex X1 (HERA). For a test where I need to do a bit of assembly language programming, I am getting below error in compilation: Error: A1616E: ...
1vote
0answers
150views

Detecting potential MASM 64-bit sign extension errors for immediate 32-bit operands (imm32)

I'm trying to write a tool to scan 64-bit assembly code looking for possible sign extension errors. For example, suppose a 32-bit constant (imm32) is defined as SOCKET_ERROR_INT EQU 0FFFFFFFFh Next, ...
0votes
1answer
94views

C/SIMD - creating an 'immediate array'; an array that returns immediate values?

#include <immintrin.h> static const unsigned char LUT[16] = { 0xE4, 0x24, 0x34, 0x04, 0x38, 0x08, 0x0C, 0x00, ...

153050per page