a gcc 4.2.4 bug(被stos指令累加后%edi作为参数的)
a gcc 4.2.4 bug(被stos指令累加后%edi作为参数的)
*
* Ok, now we can initialize the rest of the tty devices and can count
* on memory allocations, interrupts etc..
*/
int tty_init(void)
{
if (sizeof(struct tty_struct) > PAGE_SIZE)
panic("size of tty structure > PAGE_SIZE!");
/*
* dev_tty_driver and dev_console_driver are actually magic
* devices which get redirected at open time. Nevertheless,
* we register them so that register_chrdev is called
* appropriately.
*/
memset(&dev_tty_driver, 0, sizeof(struct tty_driver));
dev_tty_driver.magic = TTY_DRIVER_MAGIC;
dev_tty_driver.name = "tty";
dev_tty_driver.name_base = 0;
dev_tty_driver.major = TTY_MAJOR;
dev_tty_driver.minor_start = 0;
dev_tty_driver.num = 1;
if (tty_register_driver(&dev_tty_driver))
panic("Couldn't register /dev/tty driver\n");
(gdb) disassemble
Dump of assembler code for function tty_init:
0x0013ff5c <tty_init+0>: push %edi
0x0013ff5d <tty_init+1>: sub $0x14,%esp
0x0013ff60 <tty_init+4>: mov $0x16bb40,%edi
0x0013ff65 <tty_init+9>: xor %eax,%eax
0x0013ff67 <tty_init+11>: mov $0x27,%ecx
0x0013ff6c <tty_init+16>: cld
0x0013ff6d <tty_init+17>: rep stos %eax,%es:(%edi)
0x0013ff6f <tty_init+19>: movl $0x5402,0x16bb40
0x0013ff79 <tty_init+29>: movl $0x1567ed,0x16bb44
0x0013ff83 <tty_init+39>: movl $0x0,0x16bb48
0x0013ff8d <tty_init+49>: movw $0x4,0x16bb4c
0x0013ff96 <tty_init+58>: movw $0x0,0x16bb4e
0x0013ff9f <tty_init+67>: movw $0x1,0x16bb50
0x0013ffa8 <tty_init+76>: push %edi
0x0013ffa9 <tty_init+77>: call 0x13fec4 <tty_register_driver>
注:%edi被stos又作为tty_register_driver参数,显然不对,这应该是gcc 4.2.4的bug
a gcc 4.2.4 bug(被stos指令累加后%edi作为参数的)的更多相关文章
- rep stos dword ptr es:[edi]
本文链接:https://blog.csdn.net/ypist/article/details/8467163今天读代码时,忽然跳出如下一条指令==>>汇编代码: rep stos dw ...
- stos指令
mov ecx,30mov eax,0cccccccchrep stos dword prt es:[edi]stos指令,它的功能是将eax中的数据放入的edi所指的地址中,同时,edi会增加4个字 ...
- rep stos ptr dword es:[edi]
今天读代码时,忽然跳出如下一条指令==>>汇编代码: rep stos dword ptr es:[edi] 在网上查了相关资料显示:/************************** ...
- rep stos 指令(Intel汇编)
今天读代码时,忽然跳出如下一条指令==>> 汇编代码: rep stos dword ptr es:[edi] 在网上查了相关资料显示: /************************ ...
- gcc limits.h的bug定位看include_next和默认搜索路径
手编的交叉编译工具链经常报一堆宏未定义,例如下面是编译gtest的时候报_POSIX_PATH_MAX宏未定义,有时还会上报SSIZE_MAX等宏未定义: googletest/src/gtest-f ...
- [Bug FIX]安装 account_check_writing模块后采购收据打印报错的问题
大写金额没填报错 修改:report_check.xml文件,把<span t-esc="fill_stars(o.amount_in_word)"/>一行替换为 &l ...
- 微信公共平台注册 bug: 验证码不应该输入后,就立即检查其有效性
本文链接: https://www.cnblogs.com/hchengmx/p/10793037.html 刚刚想注册个微信公众号,就发现了这个问题,在这里记录一下. 已经发到testhome了,链 ...
- 翻页bug 在接口文档中应规范参数的取值区间
<?php$a=array("red","green","blue","yellow","brown&q ...
- 翻页bug 在接口文档中应规范参数的取值区间 接口规范
<?php$a=array("red","green","blue","yellow","brown&q ...
随机推荐
- 第一次参加acm区域赛
什么,这周天就要去参加acm焦作赛,简直不敢相信.从大一暑假七月份中旬到今天十一月23日,加入acm将近四个多月的时间,如今到了检验自己的时候了.aaaaaaaaaa.乌拉,必胜.打印个模板,在跑个步 ...
- Android O HIDL的实现对接【转】
本文转载自:https://blog.csdn.net/gh201030460222/article/details/80551897 Android O HIDL的实现对接1. HIDL的定义1.1 ...
- R语言 格式化数字
x = 1111111234.6547389758965789345 y = formatC(x, digits = 8, format = "f") # [1] "11 ...
- html 之 td valign 和 align
1.align属性趋向于左右对齐,其值包含:left.right.center 2.valign属性趋向于垂直对齐,其值包含:top.bottom.middle.baseline 兼容性 在 HTML ...
- 常用Iview样式布局
type 布局模式,可选值为flex流式布局或不选,在现代浏览器下有效 flex 布局下的垂直对齐方式,align可选值为top.middle.bottom flex 布局下的水平排列方式,justi ...
- Codeforces-Anastasia and pebbles
这是一道很有意思的(水)题. 地址戳:http://codeforces.com/problemset/problem/789/A 题目的大意呢,就是一个可爱的大姐姐的故事.说是啊,她每天都带着两个一 ...
- HTML+CSS+JS 传智 详细笔记
HTML(1)- -毕向东老师对Html的简介 CSS- -毕老师对CSS的简介 Javascript- -毕老师对JS的简介 html&css等等练习表(W3Cscholl) js练习表回顾 ...
- Python学习 day03打卡
今天学习的主要内容: ppython的基本数据类型: 1. python基本数据类型回顾 2.int---数字类型 4.str---字符串类型 一.python基本数据类型 1. int==>整 ...
- jquery事件重复绑定的几种解决方法 (二)
防止事件重复绑定共有4种方法: bind().unbind()方法 live().die()方法 off().on()方法 one()方法 一.bind().unbind()方法 bind();绑定事 ...
- hdu 2034 改革春风吹满地 多边形面积
改革春风吹满地 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem ...