Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Linux/tools/testing/selftests/x86/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 916 B image not shown  

Quelle  thunks.S   Sprache: Sparc

 
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * thunks.S - assembly helpers for mixed-bitness code
 * Copyright (c) 2015 Andrew Lutomirski
 *
 * These are little helpers that make it easier to switch bitness on
 * the fly.
 */


 .text

 .global call32_from_64
 .type call32_from_64, @function
call32_from_64:
 // rdi: stack to use
 // esi: function to call

 // Save registers
 pushq %rbx
 pushq %rbp
 pushq %r12
 pushq %r13
 pushq %r14
 pushq %r15
 pushfq

 // Switch stacks
 mov %rsp,(%rdi)
 mov %rdi,%rsp

 // Switch to compatibility mode
 pushq $0x23  /* USER32_CS */
 pushq $1f
 lretq

1:
 .code32
 // Call the function
 call *%esi
 // Switch back to long mode
 jmp $0x33,$1f
 .code64

1:
 // Restore the stack
 mov (%rsp),%rsp

 // Restore registers
 popfq
 popq %r15
 popq %r14
 popq %r13
 popq %r12
 popq %rbp
 popq %rbx

 ret

.size call32_from_64, .-call32_from_64

.section .note.GNU-stack,"",%progbits

Messung V0.5
C=96 H=100 G=97

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.