⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mem.lst

📁 au1200下的boot代码
💻 LST
📖 第 1 页 / 共 4 页
字号:
GAS LISTING /tmp/ccRMOXS7.s 			page 1   1              		.section .mdebug.abi32   2              		.previous   3              		.section	.debug_abbrev,"",@progbits   4              	$Ldebug_abbrev0:   5              		.section	.debug_info,"",@progbits   6              	$Ldebug_info0:   7              		.section	.debug_line,"",@progbits   8              	$Ldebug_line0:   9 0000 0D010000 		.text   9      02009600    9      00000101    9      FB0E0A00    9      01010101   10              	$Ltext0:  11              		.align	2  12              		.globl	copy_data_segment  13              		.ent	copy_data_segment  14              		.type	copy_data_segment, @function  15              	copy_data_segment:  16              	$LFB2:  17              		.file 1 "/mnt/hgfs/boot/booter/source/mem.c"   1:/mnt/hgfs/boot/booter/source/mem.c **** #include "example.h"   2:/mnt/hgfs/boot/booter/source/mem.c ****    3:/mnt/hgfs/boot/booter/source/mem.c **** extern int _edata, _fbss, _end;   4:/mnt/hgfs/boot/booter/source/mem.c **** extern int _data, _data_actual;   5:/mnt/hgfs/boot/booter/source/mem.c ****    6:/mnt/hgfs/boot/booter/source/mem.c **** //Relocates Initialized Data Segment from FLASH to RAM   7:/mnt/hgfs/boot/booter/source/mem.c **** void copy_data_segment()   8:/mnt/hgfs/boot/booter/source/mem.c **** {  18              		.loc 1 8 0  19              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0  20              		.mask	0x00000000,0  21              		.fmask	0x00000000,0  22              		.set	noreorder  23              		.set	nomacro  24              		   9:/mnt/hgfs/boot/booter/source/mem.c **** 	int *src = &_data_actual;	//End of text segment (start of data segment)  25              		.loc 1 9 0  26 0000 0000023C 		lui	$2,%hi(_data_actual)  10:/mnt/hgfs/boot/booter/source/mem.c **** 	int *dst = &_data;			//beginning of data segment (in RAM)  27              		.loc 1 10 0  28 0004 0000033C 		lui	$3,%hi(_data)  29              		.loc 1 9 0  30 0008 00004524 		addiu	$5,$2,%lo(_data_actual)  31              		.loc 1 10 0  32 000c 00006424 		addiu	$4,$3,%lo(_data)  11:/mnt/hgfs/boot/booter/source/mem.c ****   12:/mnt/hgfs/boot/booter/source/mem.c **** 	if(src != dst)  13:/mnt/hgfs/boot/booter/source/mem.c **** 	{  14:/mnt/hgfs/boot/booter/source/mem.c **** 		while(dst < &_edata)  15:/mnt/hgfs/boot/booter/source/mem.c **** 			*dst++ = *src++;  33              		.loc 1 15 0  34              		.loc 1 12 0  35 0010 0C00A410 		beq	$5,$4,$L8  36 0014 0000023C 		lui	$2,%hi(_edata)  37              	  38              		.loc 1 15 0GAS LISTING /tmp/ccRMOXS7.s 			page 2  39 0018 00004224 		addiu	$2,$2,%lo(_edata)  40 001c 2B188200 		sltu	$3,$4,$2  41 0020 08006010 		beq	$3,$0,$L8  42 0024 00000000 		nop  43              	  44 0028 21184000 		move	$3,$2  45              	$L5:  46 002c 0000A28C 		lw	$2,0($5)  47 0030 000082AC 		sw	$2,0($4)  48 0034 04008424 		addiu	$4,$4,4  49 0038 2B108300 		sltu	$2,$4,$3  50 003c FBFF4014 		bne	$2,$0,$L5  51 0040 0400A524 		addiu	$5,$5,4  52              	  53              	$L8:  54 0044 0800E003 		j	$31  55 0048 00000000 		nop  56              	  57              		.set	macro  58              		.set	reorder  59              	$LFE2:  60              		.end	copy_data_segment  61              		.align	2  62              		.globl	initialize_bss  63              		.ent	initialize_bss  64              		.type	initialize_bss, @function  65              	initialize_bss:  66              	$LFB3:  16:/mnt/hgfs/boot/booter/source/mem.c **** 	}  17:/mnt/hgfs/boot/booter/source/mem.c **** }  18:/mnt/hgfs/boot/booter/source/mem.c ****   19:/mnt/hgfs/boot/booter/source/mem.c ****   20:/mnt/hgfs/boot/booter/source/mem.c **** void initialize_bss()  21:/mnt/hgfs/boot/booter/source/mem.c **** {  67              		.loc 1 21 0  68              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0  69              		.mask	0x00000000,0  70              		.fmask	0x00000000,0  71              		.set	noreorder  72              		.set	nomacro  73              		  22:/mnt/hgfs/boot/booter/source/mem.c **** 	int *start = &_fbss;  74              		.loc 1 22 0  75 004c 0000023C 		lui	$2,%hi(_fbss)  23:/mnt/hgfs/boot/booter/source/mem.c **** 	int *end = &_end;  76              		.loc 1 23 0  77 0050 0000033C 		lui	$3,%hi(_end)  78              		.loc 1 22 0  79 0054 00004424 		addiu	$4,$2,%lo(_fbss)  80              		.loc 1 23 0  81 0058 1A000008 		j	$L15  82 005c 00006324 		addiu	$3,$3,%lo(_end)  83              	  84              	$L16:  24:/mnt/hgfs/boot/booter/source/mem.c ****   25:/mnt/hgfs/boot/booter/source/mem.c **** 	while(start < end)  26:/mnt/hgfs/boot/booter/source/mem.c **** 		*start++ = 0;GAS LISTING /tmp/ccRMOXS7.s 			page 3  85              		.loc 1 26 0  86 0060 000080AC 		sw	$0,0($4)  87 0064 04008424 		addiu	$4,$4,4  88              	$L15:  89 0068 2B108300 		sltu	$2,$4,$3  90 006c FCFF4014 		bne	$2,$0,$L16  91 0070 00000000 		nop  92              	  93 0074 0800E003 		j	$31  94 0078 00000000 		nop  95              	  96              		.set	macro  97              		.set	reorder  98              	$LFE3:  99              		.end	initialize_bss 100              		.align	2 101              		.globl	compare_memory 102              		.ent	compare_memory 103              		.type	compare_memory, @function 104              	compare_memory: 105              	$LFB4:  27:/mnt/hgfs/boot/booter/source/mem.c **** }  28:/mnt/hgfs/boot/booter/source/mem.c ****   29:/mnt/hgfs/boot/booter/source/mem.c **** int compare_memory(char* data1, char* data2, int bytes)  30:/mnt/hgfs/boot/booter/source/mem.c **** { 106              		.loc 1 30 0 107              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0 108              		.mask	0x00000000,0 109              		.fmask	0x00000000,0 110              		.set	noreorder 111              		.set	nomacro 112              		 113              		.loc 1 30 0 114 007c 21488000 		move	$9,$4 115 0080 2140A000 		move	$8,$5  31:/mnt/hgfs/boot/booter/source/mem.c **** 	int offset;  32:/mnt/hgfs/boot/booter/source/mem.c **** 	//DPRINTF("Compare: %X, %X, %d\n", data1, data2, bytes);  33:/mnt/hgfs/boot/booter/source/mem.c **** 	for(offset = 0; offset < bytes; ++offset) 116              		.loc 1 33 0 117 0084 0A00C018 		blez	$6,$L24 118 0088 21380000 		move	$7,$0 119              	 120              	$L22:  34:/mnt/hgfs/boot/booter/source/mem.c **** 	{  35:/mnt/hgfs/boot/booter/source/mem.c **** 		if(data1[offset] != data2[offset]) 121              		.loc 1 35 0 122 008c 21102701 		addu	$2,$9,$7 123 0090 21180701 		addu	$3,$8,$7 124 0094 00004580 		lb	$5,0($2) 125 0098 00006480 		lb	$4,0($3) 126              		.loc 1 33 0 127 009c 0100E724 		addiu	$7,$7,1 128              		.loc 1 35 0 129 00a0 0500A414 		bne	$5,$4,$L25 130 00a4 2A10E600 		slt	$2,$7,$6 131              	 132              		.loc 1 33 0GAS LISTING /tmp/ccRMOXS7.s 			page 4 133 00a8 F8FF4014 		bne	$2,$0,$L22 134 00ac 00000000 		nop 135              	 136              	$L24:  36:/mnt/hgfs/boot/booter/source/mem.c **** 		{  37:/mnt/hgfs/boot/booter/source/mem.c ****                   DPRINTF("Compare Error, Offset: %d, %X != %X (%02X != %02X)\n", offset, &data1[of  38:/mnt/hgfs/boot/booter/source/mem.c **** 			return 0;  39:/mnt/hgfs/boot/booter/source/mem.c **** 		}  40:/mnt/hgfs/boot/booter/source/mem.c **** 	}  41:/mnt/hgfs/boot/booter/source/mem.c ****   42:/mnt/hgfs/boot/booter/source/mem.c **** 	return 1; 137              		.loc 1 42 0  43:/mnt/hgfs/boot/booter/source/mem.c **** } 138              		.loc 1 43 0 139 00b0 0800E003 		j	$31 140 00b4 01000224 		li	$2,1			# 0x1 141              	 142              	$L25: 143              		.loc 1 38 0 144 00b8 0800E003 		j	$31 145 00bc 21100000 		move	$2,$0 146              	 147              		.set	macro 148              		.set	reorder 149              	$LFE4: 150              		.end	compare_memory 151              		.section	.rodata.str1.4,"aMS",@progbits,1 152              		.align	2 153              	$LC1: 154 0000 25303258 		.ascii	"%02X \000" 154      2000 155 0006 0000     		.align	2 156              	$LC4: 157 0008 0A00     		.ascii	"\n\000" 158 000a 0000     		.align	2 159              	$LC0: 160 000c 25303858 		.ascii	"%08X: \000" 160      3A2000 161 0013 00       		.align	2 162              	$LC2: 163 0014 256300   		.ascii	"%c\000" 164 0017 00       		.align	2 165              	$LC3: 166 0018 2E00     		.ascii	".\000" 167 001a 0000     		.text 168              		.align	2 169              		.globl	dump_memory 170              		.ent	dump_memory 171              		.type	dump_memory, @function 172              	dump_memory: 173              	$LFB5:  44:/mnt/hgfs/boot/booter/source/mem.c ****   45:/mnt/hgfs/boot/booter/source/mem.c **** void dump_memory(char* src, int bytes)  46:/mnt/hgfs/boot/booter/source/mem.c **** { 174              		.loc 1 46 0 175              		.frame	$sp,56,$31		# vars= 0, regs= 10/0, args= 16, gp= 0 176              		.mask	0xc0ff0000,-4GAS LISTING /tmp/ccRMOXS7.s 			page 5 177              		.fmask	0x00000000,0 178              		.set	noreorder 179              		.set	nomacro 180              		 181 00c0 C8FFBD27 		addiu	$sp,$sp,-56 182              	$LCFI0: 183 00c4 2C00B7AF 		sw	$23,44($sp) 184              	$LCFI1: 185 00c8 2800B6AF 		sw	$22,40($sp) 186              	$LCFI2: 187 00cc 3400BFAF 		sw	$31,52($sp) 188              	$LCFI3: 189 00d0 3000BEAF 		sw	$fp,48($sp) 190              	$LCFI4: 191 00d4 2400B5AF 		sw	$21,36($sp) 192              	$LCFI5: 193 00d8 2000B4AF 		sw	$20,32($sp) 194              	$LCFI6: 195 00dc 1C00B3AF 		sw	$19,28($sp) 196              	$LCFI7: 197 00e0 1800B2AF 		sw	$18,24($sp) 198              	$LCFI8: 199 00e4 1400B1AF 		sw	$17,20($sp) 200              	$LCFI9: 201 00e8 1000B0AF 		sw	$16,16($sp) 202              	$LCFI10: 203              		.loc 1 46 0 204 00ec 21B8A000 		move	$23,$5 205 00f0 3800A4AF 		sw	$4,56($sp)  47:/mnt/hgfs/boot/booter/source/mem.c **** 	int i, j;  48:/mnt/hgfs/boot/booter/source/mem.c **** 	int found = 0;  49:/mnt/hgfs/boot/booter/source/mem.c **** 	for(i = 0; i < bytes; i+=16) 206              		.loc 1 49 0 207 00f4 2700A018 		blez	$5,$L44 208 00f8 21B00000 		move	$22,$0 209              	 210 00fc 0000143C 		lui	$20,%hi($LC1) 211 0100 00001E3C 		lui	$fp,%hi($LC4)  50:/mnt/hgfs/boot/booter/source/mem.c **** 	{  51:/mnt/hgfs/boot/booter/source/mem.c **** 		printf("%08X: ", &src[i]); 212              		.loc 1 51 0 213 0104 3800A28F 		lw	$2,56($sp) 214              	$L52:  52:/mnt/hgfs/boot/booter/source/mem.c **** 			  53:/mnt/hgfs/boot/booter/source/mem.c **** 		for(j = 0; j < 16; ++j) 215              		.loc 1 53 0 216 0108 21800000 		move	$16,$0 217              		.loc 1 51 0 218 010c 21885600 		addu	$17,$2,$22 219 0110 0000023C 		lui	$2,%hi($LC0) 220 0114 00004424 		addiu	$4,$2,%lo($LC0) 221 0118 0000000C 		jal	printf 222 011c 21282002 		move	$5,$17 223              	 224              	$L33:  54:/mnt/hgfs/boot/booter/source/mem.c **** 		{  55:/mnt/hgfs/boot/booter/source/mem.c **** 			printf("%02X ", src[i+j] & 0x0FF);GAS LISTING /tmp/ccRMOXS7.s 			page 6 225              		.loc 1 55 0 226 0120 21103002 		addu	$2,$17,$16 227 0124 00004590 		lbu	$5,0($2) 228              		.loc 1 53 0 229 0128 01001026 		addiu	$16,$16,1 230              		.loc 1 55 0 231 012c 0000000C 		jal	printf 232 0130 00008426 		addiu	$4,$20,%lo($LC1) 233              	 234              		.loc 1 53 0 235 0134 1000022A 		slt	$2,$16,16 236 0138 F9FF4014 		bne	$2,$0,$L33 237 013c 7F001324 		li	$19,127			# 0x7f 238              	  56:/mnt/hgfs/boot/booter/source/mem.c **** 		}  57:/mnt/hgfs/boot/booter/source/mem.c **** 		  58:/mnt/hgfs/boot/booter/source/mem.c **** 		for(j = 0; j < 16; ++j) 239              		.loc 1 58 0 240 0140 21800000 		move	$16,$0 241 0144 0000153C 		lui	$21,%hi($LC2) 242 0148 0000123C 		lui	$18,%hi($LC3)  59:/mnt/hgfs/boot/booter/source/mem.c **** 		{  60:/mnt/hgfs/boot/booter/source/mem.c **** 			if(src[i+j] < 127 && src[i+j] > 31) 243              		.loc 1 60 0 244 014c 21103002 		addu	$2,$17,$16 245              	$L51: 246 0150 00004580 		lb	$5,0($2)  61:/mnt/hgfs/boot/booter/source/mem.c **** 			{  62:/mnt/hgfs/boot/booter/source/mem.c **** 				printf("%c", src[i+j]);  63:/mnt/hgfs/boot/booter/source/mem.c **** 				if(src[i+j] == 'H')  64:/mnt/hgfs/boot/booter/source/mem.c **** 				{  65:/mnt/hgfs/boot/booter/source/mem.c **** 					if(src[i+j+1] == 'E' && src[i+j+2] == 'L' && src[i+j+3] == 'L' && src[i+j+4] == 'O')  66:/mnt/hgfs/boot/booter/source/mem.c **** 					{  67:/mnt/hgfs/boot/booter/source/mem.c **** 						found = 1;  68:/mnt/hgfs/boot/booter/source/mem.c **** 					}  69:/mnt/hgfs/boot/booter/source/mem.c **** 				}  70:/mnt/hgfs/boot/booter/source/mem.c **** 			}  71:/mnt/hgfs/boot/booter/source/mem.c **** 			else  72:/mnt/hgfs/boot/booter/source/mem.c **** 				printf("."); 247              		.loc 1 72 0 248 0154 00004426 		addiu	$4,$18,%lo($LC3) 249              		.loc 1 60 0 250 0158 0300B310 		beq	$5,$19,$L37 251 015c 2000A228 		slt	$2,$5,32 252              	 253 0160 18004010 		beq	$2,$0,$L49 254 0164 00000000 		nop 255              	 256              	$L37: 257              		.loc 1 58 0 258              		.loc 1 72 0 259 0168 0000000C 		jal	printf 260 016c 01001026 		addiu	$16,$16,1 261              	 262              		.loc 1 58 0 263 0170 1000022A 		slt	$2,$16,16 264              		.loc 1 60 0GAS LISTING /tmp/ccRMOXS7.s 			page 7 265              		.loc 1 58 0 266 0174 F6FF4014 		bne	$2,$0,$L51 267 0178 21103002 		addu	$2,$17,$16 268              	 269              		.loc 1 49 0 270 017c 1000D626 		addiu	$22,$22,16  73:/mnt/hgfs/boot/booter/source/mem.c **** 		}  74:/mnt/hgfs/boot/booter/source/mem.c **** 		  75:/mnt/hgfs/boot/booter/source/mem.c **** 		printf("\n");  271              		.loc 1 75 0 272 0180 0000000C 		jal	printf 273 0184 0000C427 		addiu	$4,$fp,%lo($LC4) 274              	 275              		.loc 1 49 0 276 0188 2A10D702 		slt	$2,$22,$23 277              		.loc 1 51 0 278              		.loc 1 49 0 279 018c DEFF4014 		bne	$2,$0,$L52 280 0190 3800A28F 		lw	$2,56($sp) 281              	 282              	$L44: 283 0194 3400BF8F 		lw	$31,52($sp) 284              	$L50: 285 0198 3000BE8F 		lw	$fp,48($sp) 286 019c 2C00B78F 		lw	$23,44($sp) 287 01a0 2800B68F 		lw	$22,40($sp) 288 01a4 2400B58F 		lw	$21,36($sp) 289 01a8 2000B48F 		lw	$20,32($sp) 290 01ac 1C00B38F 		lw	$19,28($sp) 291 01b0 1800B28F 		lw	$18,24($sp) 292 01b4 1400B18F 		lw	$17,20($sp) 293 01b8 1000B08F 		lw	$16,16($sp) 294 01bc 0800E003 		j	$31 295 01c0 3800BD27 		addiu	$sp,$sp,56 296              	 297              	$L49: 298              		.loc 1 62 0 299 01c4 0000A426 		addiu	$4,$21,%lo($LC2) 300              		.loc 1 58 0 301              		.loc 1 62 0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -