qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Dennis Luehring <dl.soluz@gmx.net>
To: Karel Gardas <gardask@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Debian 7.8.0 SPARC64 on qemu - anything i can do to speedup the emulation?
Date: Thu, 30 Jul 2015 05:47:19 +0200	[thread overview]
Message-ID: <55B99E47.8070007@gmx.net> (raw)
In-Reply-To: <CAMO55fn121QvQOe77sV8ww-fnVsh=G9pbaGL00jRF2sKYYfG1A@mail.gmail.com>

so your aarch64 is just less todo for qemu - not EVERY >= 16bit memory 
access needs swapping or needs check for unaligned access to emulate 
bus-erros

Am 29.07.2015 um 16:41 schrieb Karel Gardas:
> ubuntu@ubuntu:~$ ./a.out
> endianess: little
> try to access unaligned word
>    equal to 0x1234: YES
>    value: 0x1234
> done
>
> On Wed, Jul 29, 2015 at 3:55 PM, Dennis Luehring <dl.soluz@gmx.net> wrote:
> > Am 29.07.2015 um 14:34 schrieb Karel Gardas:
> >>
> >>   Once it boots, tell me how to find the asnwers to your
> >> questions.
> >
> >
> > compile with gcc test.cpp and run
> >
> > -----------
> > #include <stdint.h>
> > #include <stdio.h>
> > #include <stddef.h>
> > #include <string.h>
> > #include <assert.h>
> >
> > int main()
> > {
> >   uint16_t value = 0x1234;
> >
> >   {
> >     volatile uint8_t* ptr = (uint8_t*)&value;
> >     printf("endianess: %s\n", ptr[0]==0x34 ? "little":"big");
> >   }
> >
> >   uint8_t buffer[1+sizeof(value)]={0};
> >   uint8_t* ptr = buffer;
> >   if(ptrdiff_t(ptr) % 2 == 0)
> >   {
> >     ++ptr;
> >   }
> >   uint16_t* unaligned_word = (uint16_t*)ptr;
> >
> >   ::memcpy(unaligned_word, &value, sizeof(value));
> >
> >   printf("try to access unaligned word\n");
> >   uint16_t read = *unaligned_word; // here can happen Bus-Errors,
> > Exceptions, whatever your architecture likes
> >   printf("  equal to 0x%04X: %s\n", value, read == value ? "YES":"!!NO!!");
> > // sometimes you get the value - but its still wrong
> >   printf("  value: 0x%04X\n", read);
> >   printf("done\n");
> >
> >   return 0;
> > }
> > -----------
> >

  reply	other threads:[~2015-07-30  3:47 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28  7:52 [Qemu-devel] Debian 7.8.0 SPARC64 on qemu - anything i can do to speedup the emulation? Dennis Luehring
2015-07-28  9:54 ` Artyom Tarasenko
2015-07-29  6:20   ` Dennis Luehring
2015-07-29  8:23     ` Artyom Tarasenko
2015-07-29 15:01     ` Aurelien Jarno
2015-07-30  3:52       ` Dennis Luehring
2015-07-30  7:52         ` Aurelien Jarno
2015-07-30  8:16           ` Dennis Luehring
2015-07-30  8:42             ` Artyom Tarasenko
2015-07-30  8:55             ` Aurelien Jarno
2015-07-30  9:35               ` Artyom Tarasenko
2015-07-30 10:09                 ` Aurelien Jarno
2015-07-30 18:21                   ` Dennis Luehring
2015-07-30 15:50               ` Aurelien Jarno
2015-07-31 15:31                 ` Artyom Tarasenko
2015-07-31 15:43                   ` Aurelien Jarno
2015-08-02 13:11                     ` Mark Cave-Ayland
2015-08-03  8:31                     ` Artyom Tarasenko
2015-08-03  9:17                       ` Aurelien Jarno
2015-08-18  9:24                         ` Artyom Tarasenko
2015-08-18 17:55                           ` Richard Henderson
2015-08-19 10:41                             ` Artyom Tarasenko
2015-08-19 11:00                               ` Aurelien Jarno
2015-08-19 14:41                                 ` Artyom Tarasenko
2015-08-20  5:22                                   ` Dennis Luehring
2015-08-20 10:40                                     ` Artyom Tarasenko
2015-08-20 17:19                                   ` Richard Henderson
2015-08-21  4:32                                     ` Dennis Luehring
2015-08-21  5:49                                       ` Richard Henderson
2015-08-21  6:05                                         ` Dennis Luehring
2015-08-21 15:47                                           ` Richard Henderson
2015-08-21 16:13                                             ` Aurelien Jarno
2015-08-21 16:41                                             ` Dennis Luehring
2015-08-22 16:45                                     ` Artyom Tarasenko
2015-08-22 17:47                                       ` Dennis Luehring
2015-08-22 18:53                                         ` Artyom Tarasenko
2015-08-23 12:11                                           ` Dennis Luehring
2015-08-23  0:41                                       ` Richard Henderson
2015-08-26 16:17                                         ` Artyom Tarasenko
2015-08-26 19:47                                           ` Richard Henderson
2015-08-27  5:54                                             ` Dennis Luehring
2015-08-27 15:04                                               ` Richard Henderson
2015-08-27 15:58                                             ` Artyom Tarasenko
2015-08-17 11:32                     ` Dennis Luehring
2015-08-03  7:58               ` Dennis Luehring
2015-08-03 14:51               ` Dennis Luehring
2015-08-03 15:59                 ` Karel Gardas
2015-08-03 19:51                   ` Dennis Luehring
2015-08-06  9:00                     ` Karel Gardas
2015-08-06  9:21                       ` Dennis Luehring
2015-08-06  9:27                         ` Dennis Luehring
2015-08-06 12:50                           ` Karel Gardas
2015-08-06 16:35                             ` Dennis Luehring
2015-08-18  4:25                       ` Dennis Luehring
2015-08-18  8:19                         ` Aurelien Jarno
2015-08-18 10:39                           ` Dennis Luehring
2015-08-18 11:21                           ` Dennis Luehring
     [not found]                         ` <CAMO55fkcW1eOaZSz2MJgqZEP29pTuHvTLe0Kna5eHYfg7cFyPA@mail.gmail.com>
2015-08-19  4:28                           ` Dennis Luehring
2015-07-29  8:07   ` Dennis Luehring
2015-07-29 15:03     ` Aurelien Jarno
2015-07-29  9:17 ` Karel Gardas
2015-07-29 10:20   ` Dennis Luehring
2015-07-29 13:45     ` Karel Gardas
2015-07-29 15:13       ` Aurelien Jarno
2015-07-29 10:55   ` Dennis Luehring
2015-07-29 12:34     ` Karel Gardas
2015-07-29 12:38       ` Karel Gardas
2015-07-29 13:55       ` Dennis Luehring
2015-07-29 14:41         ` Karel Gardas
2015-07-30  3:47           ` Dennis Luehring [this message]
2015-07-30  7:12             ` Paolo Bonzini
2015-07-30  8:31               ` Artyom Tarasenko
2015-08-02 19:12                 ` Alex Bennée
2015-07-30  7:55             ` Aurelien Jarno
2015-08-17 14:19               ` Artyom Tarasenko
2015-08-17 15:40                 ` Richard Henderson
2015-08-17 16:25                   ` Artyom Tarasenko
2015-08-17 21:08                     ` Aurelien Jarno
2015-08-27 15:29 ` Artyom Tarasenko
2015-09-02  4:34   ` Dennis Luehring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55B99E47.8070007@gmx.net \
    --to=dl.soluz@gmx.net \
    --cc=gardask@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).