2008-11-07 21:33:32 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								! Copyright (C) 2008 Slava Pestov.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								! See http://factorcode.org/license.txt for BSD license.
							 | 
						
					
						
							
								
									
										
										
										
											2015-07-27 00:20:55 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								USING: cpu.x86.assembler.operands kernel layouts parser
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								sequences ;
							 | 
						
					
						
							
								
									
										
										
										
											2008-11-07 21:33:32 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								IN: bootstrap.x86
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								: stack-frame-size ( -- n ) 4 bootstrap-cells ;
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-02 07:03:30 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								: nv-regs ( -- seq ) { RBX R12 R13 R14 R15 } ;
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-24 17:26:58 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								: volatile-regs ( -- seq ) { RAX RCX RDX RSI RDI R8 R9 R10 R11 } ;
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-17 04:11:48 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								! The first four parameter registers according to the Unix 64bit
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								! calling convention.
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-23 14:45:18 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								: arg1 ( -- reg ) RDI ;
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-19 14:02:12 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								: arg2 ( -- reg ) RSI ;
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-15 07:20:09 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								: arg3 ( -- reg ) RDX ;
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-02 07:03:30 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								: arg4 ( -- reg ) RCX ;
							 | 
						
					
						
							
								
									
										
										
										
											2011-11-03 14:57:23 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								: red-zone-size ( -- n ) 128 ;
							 | 
						
					
						
							
								
									
										
										
										
											2008-11-07 21:33:32 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-17 04:11:48 -04:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								<< "vocab:bootstrap/assembler/x86.unix.factor" parse-file suffix! >> call
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								<< "vocab:bootstrap/assembler/x86.64.factor" parse-file suffix! >> call
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								<< "vocab:bootstrap/assembler/x86.factor" parse-file suffix! >> call
							 |