Mercurial > hg > graal-jvmci-8
comparison src/os_cpu/bsd_x86/vm/bsd_x86_32.s @ 4006:436b4a3231bf
7098194: integrate macosx-port changes
Summary: Integrate bsd-port/hotspot and macosx-port/hotspot changes as of 2011.09.29.
Reviewed-by: kvn, dholmes, never, phh
Contributed-by: Christos Zoulas <christos@zoulas.com>, Greg Lewis <glewis@eyesbeyond.com>, Kurt Miller <kurt@intricatesoftware.com>, Alexander Strange <astrange@apple.com>, Mike Swingler <swingler@apple.com>, Roger Hoover <rhoover@apple.com>, Victor Hernandez <vhernandez@apple.com>, Pratik Solanki <psolanki@apple.com>
author | dcubed |
---|---|
date | Thu, 13 Oct 2011 09:35:42 -0700 |
parents | f08d439fab8c |
children | 980532a806a5 |
comparison
equal
deleted
inserted
replaced
4005:2ef3386478e6 | 4006:436b4a3231bf |
---|---|
1 # | 1 # |
2 # Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. | 2 # Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # | 4 # |
5 # This code is free software; you can redistribute it and/or modify it | 5 # This code is free software; you can redistribute it and/or modify it |
6 # under the terms of the GNU General Public License version 2 only, as | 6 # under the terms of the GNU General Public License version 2 only, as |
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
18 # | 18 # |
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 # or visit www.oracle.com if you need additional information or have any | 20 # or visit www.oracle.com if you need additional information or have any |
21 # questions. | 21 # questions. |
22 # | 22 # |
23 | 23 |
24 | 24 |
25 #ifdef __APPLE__ | 25 #ifdef __APPLE__ |
26 # Darwin uses _ prefixed global symbols | 26 # Darwin uses _ prefixed global symbols |
27 #define SYMBOL(s) _ ## s | 27 #define SYMBOL(s) _ ## s |
28 #define ELF_TYPE(name, description) | 28 #define ELF_TYPE(name, description) |
29 #else | 29 #else |
30 #define SYMBOL(s) s | 30 #define SYMBOL(s) s |
31 #define ELF_TYPE(name, description) .type name,description | 31 #define ELF_TYPE(name, description) .type name,description |
32 #endif | 32 #endif |
33 | 33 |
34 .globl SYMBOL(fixcw) | 34 .globl SYMBOL(fixcw) |
35 | 35 |
36 # NOTE WELL! The _Copy functions are called directly | 36 # NOTE WELL! The _Copy functions are called directly |
37 # from server-compiler-generated code via CallLeafNoFP, | 37 # from server-compiler-generated code via CallLeafNoFP, |
38 # which means that they *must* either not use floating | 38 # which means that they *must* either not use floating |
39 # point or use it in the same manner as does the server | 39 # point or use it in the same manner as does the server |
40 # compiler. | 40 # compiler. |
41 | 41 |
42 .globl SYMBOL(_Copy_conjoint_bytes) | 42 .globl SYMBOL(_Copy_conjoint_bytes) |
43 .globl SYMBOL(_Copy_arrayof_conjoint_bytes) | 43 .globl SYMBOL(_Copy_arrayof_conjoint_bytes) |
44 .globl SYMBOL(_Copy_conjoint_jshorts_atomic) | 44 .globl SYMBOL(_Copy_conjoint_jshorts_atomic) |
45 .globl SYMBOL(_Copy_arrayof_conjoint_jshorts) | 45 .globl SYMBOL(_Copy_arrayof_conjoint_jshorts) |
46 .globl SYMBOL(_Copy_conjoint_jints_atomic) | 46 .globl SYMBOL(_Copy_conjoint_jints_atomic) |
47 .globl SYMBOL(_Copy_arrayof_conjoint_jints) | 47 .globl SYMBOL(_Copy_arrayof_conjoint_jints) |
48 .globl SYMBOL(_Copy_conjoint_jlongs_atomic) | 48 .globl SYMBOL(_Copy_conjoint_jlongs_atomic) |
49 .globl SYMBOL(_mmx_Copy_arrayof_conjoint_jshorts) | 49 .globl SYMBOL(_mmx_Copy_arrayof_conjoint_jshorts) |
50 | 50 |
51 .globl SYMBOL(_Atomic_cmpxchg_long) | 51 .globl SYMBOL(_Atomic_cmpxchg_long) |
52 .globl SYMBOL(_Atomic_move_long) | 52 .globl SYMBOL(_Atomic_move_long) |
53 | 53 |
54 .text | 54 .text |
55 | 55 |
56 # Support for void os::Solaris::init_thread_fpu_state() in os_solaris_i486.cpp | 56 # Support for void os::Solaris::init_thread_fpu_state() in os_solaris_i486.cpp |
57 # Set fpu to 53 bit precision. This happens too early to use a stub. | 57 # Set fpu to 53 bit precision. This happens too early to use a stub. |
58 # ported from solaris_x86_32.s | 58 # ported from solaris_x86_32.s |
59 .p2align 4,,15 | 59 .p2align 4,,15 |
60 SYMBOL(fixcw): | 60 SYMBOL(fixcw): |
61 pushl $0x27f | 61 pushl $0x27f |
62 fldcw 0(%esp) | 62 fldcw 0(%esp) |
63 popl %eax | 63 popl %eax |
64 ret | 64 ret |
65 | 65 |
66 .globl SYMBOL(SafeFetch32), SYMBOL(Fetch32PFI), SYMBOL(Fetch32Resume) | 66 .globl SYMBOL(SafeFetch32), SYMBOL(Fetch32PFI), SYMBOL(Fetch32Resume) |
67 .globl SYMBOL(SafeFetchN) | 67 .globl SYMBOL(SafeFetchN) |
68 ## TODO: avoid exposing Fetch32PFI and Fetch32Resume. | 68 ## TODO: avoid exposing Fetch32PFI and Fetch32Resume. |
69 ## Instead, the signal handler would call a new SafeFetchTriage(FaultingEIP) | 69 ## Instead, the signal handler would call a new SafeFetchTriage(FaultingEIP) |
70 ## routine to vet the address. If the address is the faulting LD then | 70 ## routine to vet the address. If the address is the faulting LD then |
71 ## SafeFetchTriage() would return the resume-at EIP, otherwise null. | 71 ## SafeFetchTriage() would return the resume-at EIP, otherwise null. |
72 ELF_TYPE(SafeFetch32,@function) | 72 ELF_TYPE(SafeFetch32,@function) |
73 .p2align 4,,15 | 73 .p2align 4,,15 |
74 SYMBOL(SafeFetch32): | 74 SYMBOL(SafeFetch32): |
75 SYMBOL(SafeFetchN): | 75 SYMBOL(SafeFetchN): |
76 movl 0x8(%esp), %eax | 76 movl 0x8(%esp), %eax |
77 movl 0x4(%esp), %ecx | 77 movl 0x4(%esp), %ecx |
80 SYMBOL(Fetch32Resume): | 80 SYMBOL(Fetch32Resume): |
81 ret | 81 ret |
82 | 82 |
83 | 83 |
84 .globl SYMBOL(SpinPause) | 84 .globl SYMBOL(SpinPause) |
85 ELF_TYPE(SpinPause,@function) | 85 ELF_TYPE(SpinPause,@function) |
86 .p2align 4,,15 | 86 .p2align 4,,15 |
87 SYMBOL(SpinPause): | 87 SYMBOL(SpinPause): |
88 rep | 88 rep |
89 nop | 89 nop |
90 movl $1, %eax | 90 movl $1, %eax |
92 | 92 |
93 # Support for void Copy::conjoint_bytes(void* from, | 93 # Support for void Copy::conjoint_bytes(void* from, |
94 # void* to, | 94 # void* to, |
95 # size_t count) | 95 # size_t count) |
96 .p2align 4,,15 | 96 .p2align 4,,15 |
97 ELF_TYPE(_Copy_conjoint_bytes,@function) | 97 ELF_TYPE(_Copy_conjoint_bytes,@function) |
98 SYMBOL(_Copy_conjoint_bytes): | 98 SYMBOL(_Copy_conjoint_bytes): |
99 pushl %esi | 99 pushl %esi |
100 movl 4+12(%esp),%ecx # count | 100 movl 4+12(%esp),%ecx # count |
101 pushl %edi | 101 pushl %edi |
102 movl 8+ 4(%esp),%esi # from | 102 movl 8+ 4(%esp),%esi # from |
186 # copy suffix | 186 # copy suffix |
187 subl %esi,%edi | 187 subl %esi,%edi |
188 addl $3,%esi | 188 addl $3,%esi |
189 6: movb (%esi),%dl | 189 6: movb (%esi),%dl |
190 movb %dl,(%edi,%esi,1) | 190 movb %dl,(%edi,%esi,1) |
191 subl $1,%esi | 191 subl $1,%esi |
192 subl $1,%ecx | 192 subl $1,%ecx |
193 jnz 6b | 193 jnz 6b |
194 7: cld | 194 7: cld |
195 popl %edi | 195 popl %edi |
196 popl %esi | 196 popl %esi |
200 # void* to, | 200 # void* to, |
201 # size_t count) | 201 # size_t count) |
202 # | 202 # |
203 # Same as _Copy_conjoint_bytes, except no source alignment check. | 203 # Same as _Copy_conjoint_bytes, except no source alignment check. |
204 .p2align 4,,15 | 204 .p2align 4,,15 |
205 ELF_TYPE(_Copy_arrayof_conjoint_bytes,@function) | 205 ELF_TYPE(_Copy_arrayof_conjoint_bytes,@function) |
206 SYMBOL(_Copy_arrayof_conjoint_bytes): | 206 SYMBOL(_Copy_arrayof_conjoint_bytes): |
207 pushl %esi | 207 pushl %esi |
208 movl 4+12(%esp),%ecx # count | 208 movl 4+12(%esp),%ecx # count |
209 pushl %edi | 209 pushl %edi |
210 movl 8+ 4(%esp),%esi # from | 210 movl 8+ 4(%esp),%esi # from |
211 movl 8+ 8(%esp),%edi # to | 211 movl 8+ 8(%esp),%edi # to |
212 cmpl %esi,%edi | 212 cmpl %esi,%edi |
213 leal -1(%esi,%ecx),%eax # from + count - 1 | 213 leal -1(%esi,%ecx),%eax # from + count - 1 |
214 jbe acb_CopyRight | 214 jbe acb_CopyRight |
215 cmpl %eax,%edi | 215 cmpl %eax,%edi |
216 jbe acb_CopyLeft | 216 jbe acb_CopyLeft |
217 # copy from low to high | 217 # copy from low to high |
218 acb_CopyRight: | 218 acb_CopyRight: |
219 cmpl $3,%ecx | 219 cmpl $3,%ecx |
220 jbe 5f | 220 jbe 5f |
221 1: movl %ecx,%eax | 221 1: movl %ecx,%eax |
260 jz 4f | 260 jz 4f |
261 cmpl $32,%ecx | 261 cmpl $32,%ecx |
262 jbe 2f # <= 32 dwords | 262 jbe 2f # <= 32 dwords |
263 rep; smovl | 263 rep; smovl |
264 jmp 4f | 264 jmp 4f |
265 .=.+8 | 265 .space 8 |
266 2: subl %esi,%edi | 266 2: subl %esi,%edi |
267 .p2align 4,,15 | 267 .p2align 4,,15 |
268 3: movl (%esi),%edx | 268 3: movl (%esi),%edx |
269 movl %edx,(%edi,%esi,1) | 269 movl %edx,(%edi,%esi,1) |
270 subl $4,%esi | 270 subl $4,%esi |
276 jz 7f | 276 jz 7f |
277 subl %esi,%edi | 277 subl %esi,%edi |
278 addl $3,%esi | 278 addl $3,%esi |
279 6: movb (%esi),%dl | 279 6: movb (%esi),%dl |
280 movb %dl,(%edi,%esi,1) | 280 movb %dl,(%edi,%esi,1) |
281 subl $1,%esi | 281 subl $1,%esi |
282 subl $1,%ecx | 282 subl $1,%ecx |
283 jnz 6b | 283 jnz 6b |
284 7: cld | 284 7: cld |
285 popl %edi | 285 popl %edi |
286 popl %esi | 286 popl %esi |
288 | 288 |
289 # Support for void Copy::conjoint_jshorts_atomic(void* from, | 289 # Support for void Copy::conjoint_jshorts_atomic(void* from, |
290 # void* to, | 290 # void* to, |
291 # size_t count) | 291 # size_t count) |
292 .p2align 4,,15 | 292 .p2align 4,,15 |
293 ELF_TYPE(_Copy_conjoint_jshorts_atomic,@function) | 293 ELF_TYPE(_Copy_conjoint_jshorts_atomic,@function) |
294 SYMBOL(_Copy_conjoint_jshorts_atomic): | 294 SYMBOL(_Copy_conjoint_jshorts_atomic): |
295 pushl %esi | 295 pushl %esi |
296 movl 4+12(%esp),%ecx # count | 296 movl 4+12(%esp),%ecx # count |
297 pushl %edi | 297 pushl %edi |
298 movl 8+ 4(%esp),%esi # from | 298 movl 8+ 4(%esp),%esi # from |
299 movl 8+ 8(%esp),%edi # to | 299 movl 8+ 8(%esp),%edi # to |
300 cmpl %esi,%edi | 300 cmpl %esi,%edi |
301 leal -2(%esi,%ecx,2),%eax # from + count*2 - 2 | 301 leal -2(%esi,%ecx,2),%eax # from + count*2 - 2 |
302 jbe cs_CopyRight | 302 jbe cs_CopyRight |
303 cmpl %eax,%edi | 303 cmpl %eax,%edi |
304 jbe cs_CopyLeft | 304 jbe cs_CopyLeft |
305 # copy from low to high | 305 # copy from low to high |
306 cs_CopyRight: | 306 cs_CopyRight: |
307 # align source address at dword address boundary | 307 # align source address at dword address boundary |
308 movl %esi,%eax # original from | 308 movl %esi,%eax # original from |
309 andl $3,%eax # either 0 or 2 | 309 andl $3,%eax # either 0 or 2 |
320 jz 4f # no dwords to move | 320 jz 4f # no dwords to move |
321 cmpl $32,%ecx | 321 cmpl $32,%ecx |
322 jbe 2f # <= 32 dwords | 322 jbe 2f # <= 32 dwords |
323 # copy aligned dwords | 323 # copy aligned dwords |
324 rep; smovl | 324 rep; smovl |
325 jmp 4f | 325 jmp 4f |
326 # copy aligned dwords | 326 # copy aligned dwords |
327 2: subl %esi,%edi | 327 2: subl %esi,%edi |
328 .p2align 4,,15 | 328 .p2align 4,,15 |
329 3: movl (%esi),%edx | 329 3: movl (%esi),%edx |
330 movl %edx,(%edi,%esi,1) | 330 movl %edx,(%edi,%esi,1) |
375 | 375 |
376 # Support for void Copy::arrayof_conjoint_jshorts(void* from, | 376 # Support for void Copy::arrayof_conjoint_jshorts(void* from, |
377 # void* to, | 377 # void* to, |
378 # size_t count) | 378 # size_t count) |
379 .p2align 4,,15 | 379 .p2align 4,,15 |
380 ELF_TYPE(_Copy_arrayof_conjoint_jshorts,@function) | 380 ELF_TYPE(_Copy_arrayof_conjoint_jshorts,@function) |
381 SYMBOL(_Copy_arrayof_conjoint_jshorts): | 381 SYMBOL(_Copy_arrayof_conjoint_jshorts): |
382 pushl %esi | 382 pushl %esi |
383 movl 4+12(%esp),%ecx # count | 383 movl 4+12(%esp),%ecx # count |
384 pushl %edi | 384 pushl %edi |
385 movl 8+ 4(%esp),%esi # from | 385 movl 8+ 4(%esp),%esi # from |
386 movl 8+ 8(%esp),%edi # to | 386 movl 8+ 8(%esp),%edi # to |
387 cmpl %esi,%edi | 387 cmpl %esi,%edi |
388 leal -2(%esi,%ecx,2),%eax # from + count*2 - 2 | 388 leal -2(%esi,%ecx,2),%eax # from + count*2 - 2 |
389 jbe acs_CopyRight | 389 jbe acs_CopyRight |
390 cmpl %eax,%edi | 390 cmpl %eax,%edi |
391 jbe acs_CopyLeft | 391 jbe acs_CopyLeft |
392 acs_CopyRight: | 392 acs_CopyRight: |
393 movl %ecx,%eax # word count | 393 movl %ecx,%eax # word count |
394 sarl %ecx # dword count | 394 sarl %ecx # dword count |
395 jz 4f # no dwords to move | 395 jz 4f # no dwords to move |
396 cmpl $32,%ecx | 396 cmpl $32,%ecx |
397 jbe 2f # <= 32 dwords | 397 jbe 2f # <= 32 dwords |
398 # copy aligned dwords | 398 # copy aligned dwords |
399 rep; smovl | 399 rep; smovl |
400 jmp 4f | 400 jmp 4f |
401 # copy aligned dwords | 401 # copy aligned dwords |
402 .=.+5 | 402 .space 5 |
403 2: subl %esi,%edi | 403 2: subl %esi,%edi |
404 .p2align 4,,15 | 404 .p2align 4,,15 |
405 3: movl (%esi),%edx | 405 3: movl (%esi),%edx |
406 movl %edx,(%edi,%esi,1) | 406 movl %edx,(%edi,%esi,1) |
407 addl $4,%esi | 407 addl $4,%esi |
408 subl $1,%ecx | 408 subl $1,%ecx |
452 # void* to, | 452 # void* to, |
453 # size_t count) | 453 # size_t count) |
454 # Equivalent to | 454 # Equivalent to |
455 # arrayof_conjoint_jints | 455 # arrayof_conjoint_jints |
456 .p2align 4,,15 | 456 .p2align 4,,15 |
457 ELF_TYPE(_Copy_conjoint_jints_atomic,@function) | 457 ELF_TYPE(_Copy_conjoint_jints_atomic,@function) |
458 ELF_TYPE(_Copy_arrayof_conjoint_jints,@function) | 458 ELF_TYPE(_Copy_arrayof_conjoint_jints,@function) |
459 SYMBOL(_Copy_conjoint_jints_atomic): | 459 SYMBOL(_Copy_conjoint_jints_atomic): |
460 SYMBOL(_Copy_arrayof_conjoint_jints): | 460 SYMBOL(_Copy_arrayof_conjoint_jints): |
461 pushl %esi | 461 pushl %esi |
462 movl 4+12(%esp),%ecx # count | 462 movl 4+12(%esp),%ecx # count |
463 pushl %edi | 463 pushl %edi |
465 movl 8+ 8(%esp),%edi # to | 465 movl 8+ 8(%esp),%edi # to |
466 cmpl %esi,%edi | 466 cmpl %esi,%edi |
467 leal -4(%esi,%ecx,4),%eax # from + count*4 - 4 | 467 leal -4(%esi,%ecx,4),%eax # from + count*4 - 4 |
468 jbe ci_CopyRight | 468 jbe ci_CopyRight |
469 cmpl %eax,%edi | 469 cmpl %eax,%edi |
470 jbe ci_CopyLeft | 470 jbe ci_CopyLeft |
471 ci_CopyRight: | 471 ci_CopyRight: |
472 cmpl $32,%ecx | 472 cmpl $32,%ecx |
473 jbe 2f # <= 32 dwords | 473 jbe 2f # <= 32 dwords |
474 rep; smovl | 474 rep; smovl |
475 popl %edi | 475 popl %edi |
476 popl %esi | 476 popl %esi |
477 ret | 477 ret |
478 .=.+10 | 478 .space 10 |
479 2: subl %esi,%edi | 479 2: subl %esi,%edi |
480 jmp 4f | 480 jmp 4f |
481 .p2align 4,,15 | 481 .p2align 4,,15 |
482 3: movl (%esi),%edx | 482 3: movl (%esi),%edx |
483 movl %edx,(%edi,%esi,1) | 483 movl %edx,(%edi,%esi,1) |
508 rep; smovl | 508 rep; smovl |
509 cld | 509 cld |
510 popl %edi | 510 popl %edi |
511 popl %esi | 511 popl %esi |
512 ret | 512 ret |
513 | 513 |
514 # Support for void Copy::conjoint_jlongs_atomic(jlong* from, | 514 # Support for void Copy::conjoint_jlongs_atomic(jlong* from, |
515 # jlong* to, | 515 # jlong* to, |
516 # size_t count) | 516 # size_t count) |
517 # | 517 # |
518 # 32-bit | 518 # 32-bit |
527 # while (--count >= 0) { | 527 # while (--count >= 0) { |
528 # to[count] = from[count]; | 528 # to[count] = from[count]; |
529 # } | 529 # } |
530 # } | 530 # } |
531 .p2align 4,,15 | 531 .p2align 4,,15 |
532 ELF_TYPE(_Copy_conjoint_jlongs_atomic,@function) | 532 ELF_TYPE(_Copy_conjoint_jlongs_atomic,@function) |
533 SYMBOL(_Copy_conjoint_jlongs_atomic): | 533 SYMBOL(_Copy_conjoint_jlongs_atomic): |
534 movl 4+8(%esp),%ecx # count | 534 movl 4+8(%esp),%ecx # count |
535 movl 4+0(%esp),%eax # from | 535 movl 4+0(%esp),%eax # from |
536 movl 4+4(%esp),%edx # to | 536 movl 4+4(%esp),%edx # to |
537 cmpl %eax,%edx | 537 cmpl %eax,%edx |
556 | 556 |
557 # Support for void Copy::arrayof_conjoint_jshorts(void* from, | 557 # Support for void Copy::arrayof_conjoint_jshorts(void* from, |
558 # void* to, | 558 # void* to, |
559 # size_t count) | 559 # size_t count) |
560 .p2align 4,,15 | 560 .p2align 4,,15 |
561 ELF_TYPE(_mmx_Copy_arrayof_conjoint_jshorts,@function) | 561 ELF_TYPE(_mmx_Copy_arrayof_conjoint_jshorts,@function) |
562 SYMBOL(_mmx_Copy_arrayof_conjoint_jshorts): | 562 SYMBOL(_mmx_Copy_arrayof_conjoint_jshorts): |
563 pushl %esi | 563 pushl %esi |
564 movl 4+12(%esp),%ecx | 564 movl 4+12(%esp),%ecx |
565 pushl %edi | 565 pushl %edi |
566 movl 8+ 4(%esp),%esi | 566 movl 8+ 4(%esp),%esi |
574 movl %ecx,%eax | 574 movl %ecx,%eax |
575 sarl %ecx | 575 sarl %ecx |
576 je 5f | 576 je 5f |
577 cmpl $33,%ecx | 577 cmpl $33,%ecx |
578 jae 3f | 578 jae 3f |
579 1: subl %esi,%edi | 579 1: subl %esi,%edi |
580 .p2align 4,,15 | 580 .p2align 4,,15 |
581 2: movl (%esi),%edx | 581 2: movl (%esi),%edx |
582 movl %edx,(%edi,%esi,1) | 582 movl %edx,(%edi,%esi,1) |
583 addl $4,%esi | 583 addl $4,%esi |
584 subl $1,%ecx | 584 subl $1,%ecx |
585 jnz 2b | 585 jnz 2b |
586 addl %esi,%edi | 586 addl %esi,%edi |
587 jmp 5f | 587 jmp 5f |
588 3: smovl # align to 8 bytes, we know we are 4 byte aligned to start | 588 3: smovl # align to 8 bytes, we know we are 4 byte aligned to start |
589 subl $1,%ecx | 589 subl $1,%ecx |
590 4: .p2align 4,,15 | 590 4: .p2align 4,,15 |
591 movq 0(%esi),%mm0 | 591 movq 0(%esi),%mm0 |
592 addl $64,%edi | 592 addl $64,%edi |
608 addl $64,%esi | 608 addl $64,%esi |
609 movq %mm1,-8(%edi) | 609 movq %mm1,-8(%edi) |
610 cmpl $16,%ecx | 610 cmpl $16,%ecx |
611 jge 4b | 611 jge 4b |
612 emms | 612 emms |
613 testl %ecx,%ecx | 613 testl %ecx,%ecx |
614 ja 1b | 614 ja 1b |
615 5: andl $1,%eax | 615 5: andl $1,%eax |
616 je 7f | 616 je 7f |
617 6: movw (%esi),%dx | 617 6: movw (%esi),%dx |
618 movw %dx,(%edi) | 618 movw %dx,(%edi) |
619 7: popl %edi | 619 7: popl %edi |
620 popl %esi | 620 popl %esi |
621 ret | 621 ret |
622 mmx_acs_CopyLeft: | 622 mmx_acs_CopyLeft: |
623 std | 623 std |
624 leal -4(%edi,%ecx,2),%edi | 624 leal -4(%edi,%ecx,2),%edi |
655 # volatile jlong* dest, | 655 # volatile jlong* dest, |
656 # jlong compare_value, | 656 # jlong compare_value, |
657 # bool is_MP) | 657 # bool is_MP) |
658 # | 658 # |
659 .p2align 4,,15 | 659 .p2align 4,,15 |
660 ELF_TYPE(_Atomic_cmpxchg_long,@function) | 660 ELF_TYPE(_Atomic_cmpxchg_long,@function) |
661 SYMBOL(_Atomic_cmpxchg_long): | 661 SYMBOL(_Atomic_cmpxchg_long): |
662 # 8(%esp) : return PC | 662 # 8(%esp) : return PC |
663 pushl %ebx # 4(%esp) : old %ebx | 663 pushl %ebx # 4(%esp) : old %ebx |
664 pushl %edi # 0(%esp) : old %edi | 664 pushl %edi # 0(%esp) : old %edi |
665 movl 12(%esp), %ebx # 12(%esp) : exchange_value (low) | 665 movl 12(%esp), %ebx # 12(%esp) : exchange_value (low) |
677 | 677 |
678 | 678 |
679 # Support for jlong Atomic::load and Atomic::store. | 679 # Support for jlong Atomic::load and Atomic::store. |
680 # void _Atomic_move_long(volatile jlong* src, volatile jlong* dst) | 680 # void _Atomic_move_long(volatile jlong* src, volatile jlong* dst) |
681 .p2align 4,,15 | 681 .p2align 4,,15 |
682 ELF_TYPE(_Atomic_move_long,@function) | 682 ELF_TYPE(_Atomic_move_long,@function) |
683 SYMBOL(_Atomic_move_long): | 683 SYMBOL(_Atomic_move_long): |
684 movl 4(%esp), %eax # src | 684 movl 4(%esp), %eax # src |
685 fildll (%eax) | 685 fildll (%eax) |
686 movl 8(%esp), %eax # dest | 686 movl 8(%esp), %eax # dest |
687 fistpll (%eax) | 687 fistpll (%eax) |