thumb Questions

6

Solved

I am a bit confused about instruction sets. There are Thumb, ARM and Thumb 2. From what I have read Thumb instructions are all 16-bit but inside the ARMv7M user manual (page vi) there are Thumb 16-...
Rothrock asked 23/2, 2015 at 8:53

3

Solved

I have the following instruction: mov r1, r7 in my assembly code but after looking into disassembly, I've found that actual generated code was adds r1, r7, #0 I checked with ARMv6-M Architecture Re...
Elect asked 6/3, 2022 at 21:8

3

Solved

recently i checked the Instruction Set for an ARM Cortex-M3 processor. For example: ADD <Rd>, <Rn>, <Rm> What do those abbriviations mean exactly? I guess they mean different ...
Sextuplicate asked 15/1, 2016 at 19:31

2

Solved

I am new to MCU and trying to figure out how arm (Cortex M3-M4) based MCU boots. Because booting is specific to any SOC, I took an example hardware board of STM for case study. Board: STMicroele...
Trousseau asked 26/7, 2018 at 1:54

1

Solved

Is there a GCC configuration which will produce an executable only containing ARM32 code? I know the -marm switch tells the compiler not to produce Thumb code, but it applies only to the user code ...
Merganser asked 18/9, 2017 at 10:21

1

Solved

I'm trying to make my iOS app smaller (the code section of the binary is 70 MB) by using thumb instructions. There seems to be a good amount of discussion around using the thumb version of armv7, e...
Silvanus asked 7/9, 2017 at 1:1

4

Solved

Consider next code: unsigned idx; //.. some work with idx if( idx >= idx_max ) idx %= idx_max; Could be simplified to only second line: idx %= idx_max; and will achieve the same result. ...
Acrophobia asked 2/5, 2017 at 6:10

4

Solved

I've encountered a weird behavior when trying to use a thumb to move a control around on a canvas. When I add a control to a canvas and use Thumb DragDelta event to move it around everything looks ...
Ocampo asked 14/2, 2012 at 22:13

4

What does the following line do in arm assembly: 000031e6 2916 cmp r1, #22 000031e8 bf1a itte ne I get the first line (comparing r1 to 22) but what about the second line (I've never seen the itt...
Riviera asked 12/8, 2011 at 15:17

2

I've been going through ARM ISA related documentation since a while and so far I believe that I've got a good understanding for the basics of ARM/Thumb interworking. I'll quickly summarize that in ...
Gefell asked 28/7, 2015 at 8:51

2

Thumb mode instructions are 2 bytes and ARM mode instructions are 4 bytes. the screenshot is a disassembly of thumb mode instructions. why do I see 4 byte instructions mixed with 2byte instructions...
Mannered asked 8/8, 2013 at 1:16

3

Solved

I am currently trying to speed up some of my C functions on a Cortex-M0 (Freescale KL25Z) using assembly. I get a problem with this minimal test program: @.syntax unified .cpu cortex-m0 .text .gl...
Clichy asked 22/6, 2015 at 12:35

3

Solved

I'm trying to reduce the size of my elf executable. I'm compiling with -ffunction-sections -fdata-sections and linking with -gc-sections, but it appears some of the symbols that I believe are unuse...
Roseannaroseanne asked 9/7, 2014 at 9:6

1

Solved

when debugging ARMv7 binary with GDB, aside from looking the instruction length, is there a way to figure out which mode the CPU is currently in? (ARM, Thumb)
Deduct asked 26/3, 2014 at 11:46

1

I'm trying to add Rust code to an android NDK sample (native-activity); Whenever I link Rust code (compiled as a .a) into the .so , it fails to run. I went on information from here to get an andro...
Volturno asked 5/3, 2014 at 14:29

3

Solved

There is a w suffix for thumb-2 instruction as below, how does it change the semantic of the instruction without it? The search result is very noisy and I didn't get the answer. addw r0, r1, #0
Whittemore asked 5/3, 2014 at 16:39

2

Solved

I am really confused and the question may sound dumb but I'm really not sure what it means when we say an instruction size is 32-bit or 16-bit. Is it if operand size is 32-bit then we say it's an 3...
Punchinello asked 29/10, 2013 at 11:9

2

Solved

As far as I understand it, ARM Cortex-M CPUs are always in Thumb state, which means: Thumb state indicated by program counter being odd (LSB = 1). Branching to an even address will cause an exc...
Zipnick asked 6/9, 2013 at 10:44

3

So it's fairly easy to figure out what kind of CPU an iOS device runs by querying sysctlbyname("hw.cpusubtype", ...), but there seems to be no obvious way to figure out what features the CPU actual...
Pennoncel asked 18/7, 2013 at 0:33

4

Solved

I am trying to do some bare-metal programming in ARM with GCC and testing on QEMU. Whenever I call into an ARM label from C, my program hangs. I have a simple example of code that shows the problem...
Brandtr asked 21/1, 2012 at 23:2

2

I'm trying to disassemble an object built for ARM with gcc. Unfortunately, objdump is trying to guess whether the code is ARM and Thumb, and is getting it wrong: it thinks my code is Thumb when it'...
Marishamariska asked 25/8, 2011 at 16:43

1

Solved

How do I tell gcc to compile into Thumb1-only instructions? Everyone knows helloworld.c: #include <stdio.h> main() { printf("Hello world"); } And this is my command line: user@debi...
Aragon asked 20/11, 2012 at 13:31

3

Solved

I'm working on an assembly program for an ARM Cortex-M3 based microcontroller (Thumb 2 instruction set), using GNU as. In some example code I find directives like .size, .section and .type which I ...
Tiv asked 12/12, 2010 at 18:24

3

Solved

I'm working on an iPhone/iPad project, and I want to update the status register during some (not all) arithmetic operations. By default, Xcode uses 'Compile for Thumb' and I don't want to change it...
Hoffert asked 20/6, 2011 at 9:49

1

Solved

under "The Thumb instruction set" in section 1-34 of "ARM11TechnicalRefManual" it said that: "The Thumb instruction set is a subset of the most commonly used 32-bit ARM instructions.Thumb instruc...
Mintun asked 17/5, 2012 at 14:53

© 2022 - 2024 — McMap. All rights reserved.