首页 \ 问答 \ Intel x86到ARM汇编转换(Intel x86 to ARM assembly conversion)

Intel x86到ARM汇编转换(Intel x86 to ARM assembly conversion)

我目前正在学习ARM汇编语言;

为此,我试图将一些x86 code (AT&T Syntax)为ARM汇编(Intel Syntax)代码。

__asm__("movl $0x0804c000, %eax;");

__asm__("mov R0,#0x0804c000");

从这个文档中 ,我了解到在x86中,堆结构的Chunk 1从0x0804c000开始。 但是,当我尝试做同样的操作时,我收到以下错误:

/tmp/ccfNZp9F.s:174: Error: invalid constant (804c000) after fixup

我假设问题是ARM只能加载32位指令。

Question 1: Any idea what would be the first chunk in case of ARM processors?


Question 2:

从我之前的问题 ,我知道内存间接寻址是如何工作的。

下面写的片段是否做同样的工作?

movl (%eax), %ebx

LDR R0,[R1]

我正在使用ARMv7 Processor rev 4 (v7l)


I am currently learning ARM assembly language;

To do so, I am trying to convert some x86 code (AT&T Syntax) to ARM assembly (Intel Syntax) code.

__asm__("movl $0x0804c000, %eax;");

__asm__("mov R0,#0x0804c000");

From this document, I learn that in x86 the Chunk 1 of the heap structure starts from 0x0804c000. But I when I try do the same in arm, I get the following error:

/tmp/ccfNZp9F.s:174: Error: invalid constant (804c000) after fixup

I am assuming the problem is that ARM can only load 32bit instructions.

Question 1: Any idea what would be the first chunk in case of ARM processors?


Question 2:

From my previous question, I know how memory indirect addressing works.

Are the snippets written below doing the same job?

movl (%eax), %ebx

LDR R0,[R1]

I am using ARMv7 Processor rev 4 (v7l)


原文:https://stackoverflow.com/questions/17297695
更新时间:2022-05-05 22:05

最满意答案

不是我所知道的。 它需要

SELECT Fname, Lname, Dependent_Name, Relationship
FROM EMPLOYEE 
  LEFT JOIN DEPENDENT ON Ssn = Essn
WHERE Adddress LIKE '%TX'

Not as far as I'm aware. It needs to be

SELECT Fname, Lname, Dependent_Name, Relationship
FROM EMPLOYEE 
  LEFT JOIN DEPENDENT ON Ssn = Essn
WHERE Adddress LIKE '%TX'

相关问答

更多
  • @ ChaosPandion关于重新格式化的评论是一个好主意,但也许你需要一些帮助来理解什么是好的格式化。 嗯,这对每个人来说可能都不一样:-)但如果我正在编写你的查询,我会将其格式化如下: SELECT TOP (100) PERCENT a.Id, a.DateCreated, a.DateModified, a.LastUpdatedBy, a.AccomplishmentTypeId, ...
  • 您正在使用隐式连接语法。 这相当于使用JOIN关键字,但完全避免使用此语法是一个好主意,而是使用显式连接: SELECT bb.name FROM big_box bb JOIN middle_box mb ON mb.parent_box = bb.id JOIN little_box lb ON lb.parent_box = mb.id WHERE lb.color = 'green' 您还缺少连接条件中的列名称。 我猜想这个专栏叫做id 。 这种类型的查询应该是有效的,如果表正确索引。 特别是在连 ...
  • 您可以使用: on ProductRaw like ProductClean + '%' 但是,我的建议是使用计算列更改表: alter table t add ProductClean as (left(ProductRaw, charindex(' (', ProductRaw + ' (') - 1))); 然后,您可以在ProductClean上添加索引并执行更合理的连接: on t.ProductClean = ?.ProductClean You can use like: on ...
  • SELECT field1, field2, field2 FROM tableA WHERE field1='x' UNION SELECT field1, field2, field2 FROM tableB WHERE field1='x' 如果你想要每条记录,请使用UNION ALL ,甚至重复。 SELECT field1, field2, field2 FROM tableA WHERE field1='x' UNION SELECT field1, field2, field2 FROM t ...
  • 内部联接: SELECT exp_member_groups.group_title FROM exp_members INNER JOIN exp_member_groups ON exp_members.group_id = exp_member_groups.group_id WHERE exp_members.member_id = @memberId INNER JOIN: SELECT exp_member_groups.group_title FROM exp_members INNER J ...
  • 不是我所知道的。 它需要 SELECT Fname, Lname, Dependent_Name, Relationship FROM EMPLOYEE LEFT JOIN DEPENDENT ON Ssn = Essn WHERE Adddress LIKE '%TX' Not as far as I'm aware. It needs to be SELECT Fname, Lname, Dependent_Name, Relationship FROM EMPLOYEE LEFT JOI ...
  • 试试这个查询。 select S.userName, S.firstName, S.lastName, A.actionDetails, A.actionDate from Departments D join Staff S on d.departmentID=s.departmentID join Actions A on s.staffID=A.staffID WHERE D.departmentID = YourDeparmentID; SQl中的JOIN类型 Try this Query. ...
  • 用它作为 var result = (from t1 in table1 join t2 in table2 on t1.id equals t2.itemId into t2d from td in t2d.DefaultIfEmpty() group t1 by t1.item into t1g select new {item=t1g.key, sum =t1g.Sum(p ...
  • 您不需要加入,您需要使用UNION查询: SELECT title, painterID artistID FROM Paintings UNION ALL SELECT title, sculptorID artistID FROM Sculptures 这将选择Paintings表中的所有绘画,以及Sculptures表中的所有雕塑。 painterID和sculptorID都将具有artistID的别名。 You don't need a Join, you need to use an UNION ...
  • 此查询执行“详细信息”表的自联接以获取所需的结果。 SELECT distinct new.buildNumber FROM CSAResults.dbo.Details old JOIN CSAResults.dbo.Details new ON old.buildNumber = new.buildNumber WHERE old.result = 'pass' AND old.versionStatus = 'Old' AND new.result='fail' AND new.versi ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)