• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/kvm-unit-tests/0001-x86-hyperv_clock-be-explicit-about-mul-instruction-d.patch
Thomas PetazzoniThomas Petazzoni committed bdadcf593d508 May 2017
Raw file
Source viewDiff to previous
 
1
From 022ae220d6e7b5bd064bc8698c271dca4dac7d8c Mon Sep 17 00:00:00 2001
2
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3
Date: Mon, 8 May 2017 22:27:25 +0200
4
Subject: [PATCH] x86/hyperv_clock: be explicit about mul instruction data size
5
​
6
With gcc 4.7.2, the build fails with:
7
​
8
x86/hyperv_clock.c: Assembler messages:
9
x86/hyperv_clock.c:21: Error: no instruction mnemonic suffix given and no register operands; can't size instruction
10
​
11
In order to avoid this, make the mul instruction data size explicit by
12
adding the appropriate suffix. It operates on 64-bit data, so use
13
"mulq".
14
​
15
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
16
---
17
 x86/hyperv_clock.c | 2 +-
18
 1 file changed, 1 insertion(+), 1 deletion(-)
19
​
20
diff --git a/x86/hyperv_clock.c b/x86/hyperv_clock.c
21
index 8b1deba..6c4dd56 100644
22
--- a/x86/hyperv_clock.c
23
+++ b/x86/hyperv_clock.c
24
@@ -19,7 +19,7 @@ static inline u64 scale_delta(u64 delta, u64 mul_frac)
25
    u64 product, unused;
26
 
27
    __asm__ (
28
-       "mul %3"
29
+       "mulq %3"
30
        : "=d" (product), "=a" (unused) : "1" (delta), "rm" ((u64)mul_frac) );
31
 
32
    return product;
33
-- 
34
2.7.4
35
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.